Welcome to the Southern African Autolisp Website.
You are Visitor Number
|
| Home. | Page II. | Page III. |
(setq a (entlast))
Lisp should return something like this:
<Entity name: 2680880>
This is the Entity Name of the Line that you have just drawn.
Now type "Erase" then !a and press Enter twice.
The line should disappear. Type "OOPS" to bring it back.
You have just modified the AutoCAD Database.
Now type this :
(setq b (entget a))
This will retrieve the Entity Data. It should look something like this :
((-1 . <Entity name: 2680880>) (0 . "LINE") (5 . "270") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbLine") (10 400.378 621.82 0.0) (11 740.737 439.601 0.0) (210 0.0 0.0 1.0))
Now type this line:
(setq c (cdr (assoc 10 b)))
Lisp should return:
(400.378 621.82 0.0)
Before you type the next few lines, make sure that your snap is
turned off.
Command: circle 3P/2P/TTR/<Center point>: !c Diameter/<Radius> <10.0>: 20
A circle should be drawn at the end of the line.
| Home. | Page II. | Page III. |