HOW TO CONVERT CIRCLES TO ANY PREDEFINED SHAPE

HOW TO CONVERT CIRCLES TO ANY PREDEFINED SHAPE

Anonymous
Not applicable
1,585 Views
6 Replies
Message 1 of 7

HOW TO CONVERT CIRCLES TO ANY PREDEFINED SHAPE

Anonymous
Not applicable

 

query.jpg

 

0 Likes
1,586 Views
6 Replies
Replies (6)
Message 2 of 7

imadHabash
Mentor
Mentor

Hi,

there is a way IF .... your circles are a blocks ( different size and separated blocks ) and your shape is a block . then you can replace a block with another one .  >> Click <<

 

Regards,

 

 

Imad Habash

EESignature

0 Likes
Message 3 of 7

Anonymous
Not applicable

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.

0 Likes
Message 4 of 7

imadHabash
Mentor
Mentor

>> 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

EESignature

0 Likes
Message 5 of 7

JTBWorld
Advisor
Advisor

With a bit of programming it can be done. If interested contact me.


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 6 of 7

leeminardi
Mentor
Mentor

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)
)

 

lee.minardi
0 Likes
Message 7 of 7

Moshe-A
Mentor
Mentor

@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

 

0 Likes