0% found this document useful (0 votes)
51 views1 page

Convert Object To Another Entity

The document provides a solution to convert point objects in a CAD drawing to other entities like circles or crossing lines. A Lisp code is presented that uses a selection set to locate all point objects, then draws a circle or cross at each point's location. The code also offers a way to delete the original point objects after converting them.

Uploaded by

Arni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views1 page

Convert Object To Another Entity

The document provides a solution to convert point objects in a CAD drawing to other entities like circles or crossing lines. A Lisp code is presented that uses a selection set to locate all point objects, then draws a circle or cross at each point's location. The code also offers a way to delete the original point objects after converting them.

Uploaded by

Arni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Issue:

You have a drawing containing point objects and you would like to convert these to another entity type like a
circle or crossing lines.

Causes:
This can be useful when you need to import your DWG file in a different CAD program that cannot view or
does not enable snapping to point objects (i.e. Revit).

Solution:
The following Lisp code will locate any point object in the drawing and draw a circle at its location where the
centre of the circle coincides with the point location:

(setq
ss (ssget "X" '((0 . "POINT")))
ct 0
)
(repeat (sslength ss)
(setq inspt (cdr (assoc 10 (entget (ssname ss ct)))))
(command "_circle" inspt 0.5)
(setq ct (1+ ct))
)

he following Lisp code will locate any point object in the drawing and draw a cross (4 line objects) at its
location where the centre of the cross coincides with the point location:

(setq
ss (ssget "X" '((0 . "POINT")))
ct 0
)
(repeat (sslength ss)
(setq inspt (cdr (assoc 10 (entget (ssname ss ct)))))
(command "_line" inspt "@0.5,0.5" "")
(command "_line" inspt "@-0.5,0.5" "")
(command "_line" inspt "@0.5,-0.5" "")
(command "_line" inspt "@-0.5,-0.5" "")
(setq ct (1+ ct))
)

If you wish to delete the point objects following the creation of the circles or crosses created using the code
above, simply run the following Lisp code stright after having created the circles or crosses:

(command "_erase" ss "")

To run Lisp code simply copy the code to the clipboard, then paste it in the AutoCAD command line and press
Enter.

You might also like