I WANT TO REPLACE 7000 HOLES OF VARYING DIAMETER ,
RANGES BETWEEN 6CM - 30 CM
EACH CIRCLES ARE DIFFEERENT,
CAN I CONVERT THESE 7000 HOLES TO PREDEFINED SHAPES ? IN A SINGLE CLICK.
>> CAN I CONVERT THESE 7000 HOLES TO PREDEFINED SHAPES ? IN A SINGLE CLICK.
drawing a single line in AutoCAD needs two click !! 😉 without the way that i told it you in my previous post i doubt that it could be .
All the best ... 🙂
Imad Habash
With a bit of programming it can be done. If interested contact me.
Here's a simple vlisp program "circlemark" that adds scaled blocks at the center of selected circles.
Create a block with a width and height of 1.0. The block will be scaled to the size of the circle when added to the drawing. You can explode the block and delete the circles after execution.
; Adds a blocked at the location of selected circles.
; The block is scaled by the radius of the circle.
; LRM 4/21/2019
(defun c:circlemark(/)
(setq bn (getstring "\nEnter block name:"))
if (setq ss (ssget '((0 . "CIRCLE"))))
(progn
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(setq r (cdr (assoc 40 ed)))
(setq pos (cdr (assoc 10 ed)))
(command "-insert" bn "s" (* 2 r) pos "")
(setq i (1+ i)
) ; end setq i
) ;end while
) ; end progn
) ;end if
(princ)
)
@Anonymous hi,
Attached cpat.lsp file to do what you want. plus cpat1.dwg block pattern to replace the circles.
save these files in your lisp library folder and load the lisp.
key in cpat on the command line and you will get this prompt:
Specify pattern to insert [cpat1/cpat2/cpat3] <1>:
you reply with 1 or 2 or 3 but at this moment there is only one block pattern (cpat1) with the pattern you want but as you can understand you can add more patterns. if you do? the new patterns must be build base on cpat1 which means it must be inscribed circle with R=1.0
next prompt
Select objects: <only circles will be selected>
enjoy
moshe