Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

HOW TO CONVERT CIRCLES TO ANY PREDEFINED SHAPE

Anonymous

HOW TO CONVERT CIRCLES TO ANY PREDEFINED SHAPE

Anonymous
No aplicable

 

query.jpg

 

0 Me gusta
Responder
1.076 Vistas
6 Respuestas
Respuestas (6)

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

Anonymous
No aplicable

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

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 !! :cara_guiñando_un_ojo:  without the way that i told it you in my previous post i doubt that it could be .

 

All the best ... :cara_con_una_leve_sonrisa:

Imad Habash

EESignature

0 Me gusta

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

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

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