Jump to content

Recommended Posts

Posted

Hi all, I am new to the forum in being an actual member, but have referenced these threads for quite a while when google searching for a specific need. However, my most recent search has drawn very little help and nothing specific to what I am desiring for my CAD needs. There is something similar in these threads, but the lisp given doesn't work specific to what I am hoping to achieve. If there is another lisp routine, I haven't found it.

 

I am needing to "explode" (so to speak) multiple objects away from a center point, so that I can dimension each individual object separately because of the complexity of the design. I am attaching a snippit of the original design and then an idea of what I am trying to achieve (although all objects not moved for reference). If anyone has a solution for this, I would be more than grateful.

 

I am using AutoCAD 2017, but new to this version. Previous v2014. Been using AC since v2006.

 

Capture 1.jpg

 

Capture 2.jpg

Posted

If it were me, I'd make each part a block, scale the whole thing up, then redefine each block's scale as 1. If you haven't done it already, or if it's not feasible, then it would probably take more time than it would save.

 

Annotative blocks could do the same thing, with the bonus of being able to show both layouts, but again, probably not feasible.

 

Shouldn't be hard to write a LISP routine for this, as long as each piece is a single entity, e.g. polylines.

Posted

Yeah, blocking, scaling and redefining would take a lot more time. Annotative not worth it for this. They are already polylines though, but unfortunately, I haven't taken the time to learn how to write lisp routines, even though I should. Someone surely has to already have a lisp for this somewhere.

Posted

Tried Group Scale 2X Ungroup Scale 0.5x each object so would need to test a bit more. To see if it works.

Posted

See if something like this can help (taken from my library...)

 

(defun c:radialmove ( / c ci laycoll laylst layfilt ssx i ent p entplst r )

 (vl-load-com)

 (setq c (getpoint "\nPick or specify center point for radial move : "))
 (vl-cmdf "_.circle" c "\\")
 (setq ci (entlast))
 (setq laycoll (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
 (vlax-for lay laycoll
   (if (eq (vla-get-lock lay) :vlax-false)
     (setq laylst (cons (vla-get-name lay) laylst))
   )
 )
 (setq layfilt "")
 (foreach lay laylst
   (setq layfilt (strcat "," lay layfilt))
 )
 (setq layfilt (vl-string-left-trim "," layfilt))
 (setq ssx (ssget "_X" (list (cons 8 layfilt))))
 (setq i -1)
 (while (setq ent (ssname ssx (setq i (1+ i))))
   (setq p (vlax-invoke (vlax-ename->vla-object ci) 'intersectwith (vlax-ename->vla-object ent) acextendnone))
   (if p 
     (progn
       (setq p (list (car p) (cadr p) (caddr p)))
       (setq entplst (cons (cons p ent) entplst))
     )
   )
 )
 (entdel ci)
 (vl-cmdf "_.circle" c "\\")
 (setq ci (entlast))
 (setq r (cdr (assoc 40 (entget ci))))
 (foreach entp entplst
   (vl-cmdf "_.move" (cdr entp) "" (car entp) (polar c (angle c (car entp)) r))
 )
 (entdel ci)
 (princ)
)

 

M.R.

Posted

Tried using your code, but received this error during it .... (i changed the input command to RMOVE for quicker typing)

 

Command: RMOVE

Pick or specify center point for radial move : cen of _.circle

Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:

Specify radius of circle or [Diameter] : 10'

 

Command: ; error: AutoCAD.Application: Null extents

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