Move all to origin help
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Move all to origin help

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Dr Fleau
Guest





Posted: Thu Jul 21, 2005 7:37 am    Post subject: Move all to origin help Reply with quote

I tried to write a routine in LISP that would take everything in the
drawing, extract the lower left-most point (as in BOUNDINGBOX lower
left) and move that point to (0,0).

I've managed to get lines and plines alright, but I'm stuck with
circles, ellipses and the like.

Quick exposure: it's for a metalworking machine that uses (0,0) as the
start point for a plasma cutter. I would typically use this on simple
geometric figures on 1 layer (0), not a 12-storey building ventilation
and wiring diagram.

I did try to use BOUNDINGBOX in vba, but quickly had to fight off the
urge to chuck my monitor and tower into the street; I'm not quite
confortable with vb yet.

Any help ?

Power to the peephole

Dr Fleau

Back to top
Fatfreek
Guest





Posted: Wed Jul 27, 2005 6:03 am    Post subject: Re: Move all to origin help Reply with quote

(vla-getboundingbox
(vlax-ename->vla-object (car (entsel)))
'minpt
'maxpt
)
(setq LowLeftPt
(vlax-safearray->list minpt)
)
(setq UpRightPt
(vlax-safearray->list maxpt)
)


"Dr Fleau" <dr_fleau-obvious-@lycos-obvious.com> wrote in message
news:282ud198bv4m9du4lagl559vor8ptt98mg@4ax.com...
Quote:
I tried to write a routine in LISP that would take everything in the
drawing, extract the lower left-most point (as in BOUNDINGBOX lower
left) and move that point to (0,0).

I've managed to get lines and plines alright, but I'm stuck with
circles, ellipses and the like.

Quick exposure: it's for a metalworking machine that uses (0,0) as the
start point for a plasma cutter. I would typically use this on simple
geometric figures on 1 layer (0), not a 12-storey building ventilation
and wiring diagram.

I did try to use BOUNDINGBOX in vba, but quickly had to fight off the
urge to chuck my monitor and tower into the street; I'm not quite
confortable with vb yet.

Any help ?

Power to the peephole

Dr Fleau
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB