Results 1 to 6 of 6

Thread: move an object a specyfic distance LISP

  1. #1
    100 Club
    Join Date
    2009-01
    Location
    Warsaw Poland
    Posts
    130
    Login to Give a bone
    0

    Default move an object a specyfic distance LISP

    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

  2. #2
    Active Member
    Join Date
    2008-06
    Location
    Australia
    Posts
    51
    Login to Give a bone
    0

    Default Re: move an object a specyfic distance LISP

    You can basically do this with the move command.
    Select the object, pick a random point drag in required direction, type 50 and enter.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: move an object a specyfic distance LISP

    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:
    Code:
    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>:

  4. #4
    100 Club
    Join Date
    2009-01
    Location
    Warsaw Poland
    Posts
    130
    Login to Give a bone
    0

    Default Re: move an object a specyfic distance LISP

    Quote Originally Posted by steve.ashton View Post
    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

    Quote Originally Posted by irneb View Post
    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:
    Code:
    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

  5. #5
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: move an object a specyfic distance LISP

    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.

  6. #6
    100 Club
    Join Date
    2009-01
    Location
    Warsaw Poland
    Posts
    130
    Login to Give a bone
    0

    Default Re: move an object a specyfic distance LISP

    Quote Originally Posted by ccowgill View Post
    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



    Quote Originally Posted by ccowgill View Post
    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

Similar Threads

  1. Move objects apart by a predetermined distance
    By BrianTFC in forum AutoLISP
    Replies: 1
    Last Post: 2012-02-17, 04:45 PM
  2. Move entities a certain distance
    By BrianTFC in forum AutoLISP
    Replies: 1
    Last Post: 2012-02-08, 12:01 PM
  3. Replies: 1
    Last Post: 2011-11-19, 11:02 AM
  4. Coordinate Array distance & move distance
    By nextvkin in forum Dynamic Blocks - Technical
    Replies: 1
    Last Post: 2011-07-12, 07:15 PM
  5. Recall move/copy distance
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-01-05, 05:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •