View Full Version : move an object a specyfic distance LISP
Macieto
2009-02-16, 04:07 PM
Hi forum,
I need a LISP routine that will move an object a specyfic distance (50mm). I will explain it on example....
Let's say that i have a line on the drawing and let's assume that the LISP routine i need is called MOVE50. So i write MOVE50 and then autocad ask me to select an object to be moved 50mm and after i choose one the autocad ask me to show the direction for moveing (like in OFFSET command). When i show the direction autocad ask me for choosing another object or exit. So generally i think of sth like this
command: MOVE50
select object or [Settings]
1 found
Specify through point
1 MOVED50
select object or [Settings]
.....
....
and so on
and the settings is the place where i determine the distance f.e. 50mm
does anybody know the LISP routine that does that???
Regards,
Maciek
steve.ashton
2009-02-16, 11:33 PM
You can basically do this with the move command.
Select the object, pick a random point drag in required direction, type 50 and enter.
irneb
2009-02-17, 05:45 AM
If you mean you want to move it to an offset side, as if you do an offset then delete the original. You can do this with the OFFSET command. When asked for the Offset distance, type E (for Erase) and Y (for Yes delete source object). Here's the command line:
OFFSET
Current settings: Erase source=No Layer=Source OFFSETGAPTYPE=0
Specify offset distance or [Through/Erase/Layer] <40.0000>: e
Erase source object after offsetting? [Yes/No] <No>: y
Specify offset distance or [Through/Erase/Layer] <40.0000>:
Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Select object to offset or [Exit/Undo] <Exit>:
Macieto
2009-02-17, 09:17 AM
You can basically do this with the move command.
Select the object, pick a random point drag in required direction, type 50 and enter.
yea, but i dont want to do it this way because i would have a lot to move :-)
If you mean you want to move it to an offset side, as if you do an offset then delete the original. You can do this with the OFFSET command. When asked for the Offset distance, type E (for Erase) and Y (for Yes delete source object). Here's the command line:
OFFSET
Current settings: Erase source=No Layer=Source OFFSETGAPTYPE=0
Specify offset distance or [Through/Erase/Layer] <40.0000>: e
Erase source object after offsetting? [Yes/No] <No>: y
Specify offset distance or [Through/Erase/Layer] <40.0000>:
Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Select object to offset or [Exit/Undo] <Exit>:
that's exactly what i wanted - i just didnt know that OFFSET command has this option :-)
thank You very much
Maciek
ccowgill
2009-02-17, 12:50 PM
you can also use the EXOFFSET express tool, then you only need to hold down control when picking the offset side to delete the original object after it has been offset. Shift will allow you to offset multiple times. We use these tools so much, we redefined the O command alias to run EXOFFSET instead of regular OFFSET.
Macieto
2009-02-17, 03:39 PM
you can also use the EXOFFSET express tool, then you only need to hold down control when picking the offset side to delete the original object after it has been offset. Shift will allow you to offset multiple times. .
wow, thats even better than changing settings in OFFSET command
We use these tools so much, we redefined the O command alias to run EXOFFSET instead of regular OFFSET
great idea - i've just changed it in my pgp :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.