Hello
NO you draw a Block with standard drawing entities (NOT with A Graphic Point)
- "CIRCLE" with a Circle
- "CROSS" with 2 Lines as a X
- "SQUARE" with a Square (Pline)
- etc
And you run the "good" Lisp routine "P2B" to draw a Block on selected graphic Points
Then you can easily later delete graphic Points ...
Please find below an OLD Lisp routine "P2B" (I don't remember who has written it !?)
which draws a Block (already inserted into your main DWG) "on Top" of selected Points ...
You load the Lisp Routine with the command: APPLOAD <Enter>
Then always with the keyboard: P2B <Enter>
...
Regards, Patrice
(defun c:P2B (/ ss ct len e eb bname pt attreqhold echohold)
;;;get command echo setting and store it
(setq echohold (getvar "CMDECHO"))
;;;set command echo off
(setvar "CMDECHO" 0)
;;;get attribute request setting and store it
(setq attreqhold (getvar "ATTREQ"))
;;;set attribute request off
(setvar "ATTREQ" 0)
;;;get name of block to insert
(setq bname (getstring "\nBlock name: "))
;;;check that the block is defined in the current drawing
(if (tblsearch "block" bname)
(progn
;;;prompt for point selection
(princ "\nSelect point objects:")
;;; --- if point objects were selected ---
(if (setq ss (ssget '((0 . "POINT"))))
(progn
;;;walk through point objects
(setq len (sslength ss))
(setq ct 0)
(while (< ct len)
;;;for each point
(setq e (ssname ss ct))
(setq ct (+ ct 1))
(setq eb (entget e))
;;;get insert point
(setq pt (cdr (assoc 10 eb)))
;;;insert block
(command "_insert" bname pt "" "" "")
)
)
(princ "\nNo point objects selected.")
)
)
(princ "\nInvalid, block not defined in drawing.")
)
;;;restore command echo setting to stored value
(setvar "CMDECHO" echohold)
;;;restore attribute request setting to stored value
(setvar "ATTREQ" attreqhold)
(princ)
)
Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks
Patrice BRAUD