Jump to content

Recommended Posts

Posted

Hi All,

 

 

I've a drawing with 2500 circles on it. Only thing is the they are not circles, they are polylines. How can I quickly replace Polylines with Circles or find the centre of all these polylines.

 

 

Any help please.

 

 

Regards,

 

 

DECHAL.

Posted

Can you post an example? I drew a circle with a polyline and center OSnap worked.

 

Are you familiar with the M2P object snap?

Posted

Those are splines, not polylines in the blocks.

 

Did you try the M2P osnap? It works in this case.

 

Unless there is a good reason to have circles drawn with splines, I would change the block definition to be a circle.

Posted

I had solutions to your question, but your drawing shows Splines made in a circle shape that are blocks, not Closed Polylines.

 

I'll move your thread to the AutoLISP, Visual LISP & DCL Forum.

 

Maybe someone knows of some code to convert them.

Posted

SLW, they are blocks and easily changed to circles. Please look at my response, it has two solutions to this situation. No code necessary.

Posted

Here, try this simple code...

 

(defun c:convblockspls2circles ( / ss i bl bln spl spldxf10 p1 p2 p3 )
 (prompt "\nSelect blocks that conatain circular splines")
 (setq ss (ssget "_:L" '((0 . "INSERT") (2 . "block*"))))
 (setq i -1)
 (while (setq bl (ssname ss (setq i (1+ i))))
   (setq bln (cdr (assoc 2 (entget bl))))
   (command "_.explode" bl)
   (while (> (getvar 'cmdactive) 0) (command ""))
   (setq spl (entlast))
   (setq spldxf10 (member (assoc 10 (entget spl)) (entget spl)))
   (setq p1 (cdr (nth 0 spldxf10)))
   (setq p2 (cdr (nth 3 spldxf10)))
   (setq p3 (cdr (nth 6 spldxf10)))
   (entdel spl)
   (command "_.-purge" "_b" bln "_n")
   (while (> (getvar 'cmdactive) 0) (command ""))
   (command "_.circle" "_3p" "_non" p1 "_non" p2 "_non" p3)
 )
 (princ)
)

(defun c:cbs2c nil (c:convblockspls2circles))

 

HTH, M.R.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...