Print Page | Close Window

Move objects in certain axis using command line

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=12233
Printed Date: 05.Jun.2025 at 18:32


Topic: Move objects in certain axis using command line
Posted By: HaiderOfSweden
Subject: Move objects in certain axis using command line
Date Posted: 24.Feb.2017 at 10:16
Hi!

I am looking for a method to move or copy something from a given point (click) to e.g. 20,*,* where * is the previous value.
Can this be done using command line, or lisp?
I am thinking for something similar to the @-character,.



Replies:
Posted By: John Connor
Date Posted: 24.Feb.2017 at 11:51
Could you be referring to the "FROM" modifier?

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: Kent Cooper
Date Posted: 24.Feb.2017 at 18:00
If you mean you want to Move or Copy something(s) in the X-axis direction, and [by "previous value" you mean] keep the Y and Z coordinates of its/their original location(s), that's easy -- there are several ways to get there (see Help about these commands, in the area of describing Displacements):
 
MOVE [or COPY]
<select object(s)>
Specify base point or [Displacement] <Displacement>: 20,0,0
Specify second point or <use first point as displacement>: <Enter>
or
 
Specify base point or [Displacement] <Displacement>: <Enter>
Specify displacement <prior displacement offered as default, if any>: 20,0,0
or
 
Specify base point or [Displacement] <Displacement>: <pick any point>
Specify second point or <use first point as displacement>: @20,0,0
or
 
Pre-select object(s), pick on a grip and hit Enter/space to go into Move mode.  If you want to Copy instead, type C for the Copy option.  Then either type in @20,0,0 or with Ortho on, "aim" the cursor to the right and type in just 20.
 
If by "previous value" you mean something different than that (the X and Y coordinates of some other previous location or operation?), come back with a more detailed description of just what you mean.


Posted By: HaiderOfSweden
Date Posted: 02.Mar.2017 at 17:39
Thank you Kent,

Your explanation helped me a lot! I knew there was an easy way :)
With "previous value" I meant of course "previous location" or even better, "current location".

I tried them all and I did some experiments on the @-thing. Can you confirm that the third example doesn't need any @ in it? Only the fourth example had to have a @, and without it, it did not work correctly.


Posted By: Kent Cooper
Date Posted: 02.Mar.2017 at 19:04
Originally posted by HaiderOfSweden HaiderOfSweden wrote:

Thank you Kent,
.... Can you confirm that the third example doesn't need any @ in it? ....
 
You can confirm it easily enough with minimal experimentation, but yes, it's a "raw" displacement, which just needs X Y & Z values outright.  Since it's already been designated a displacement, it won't try to use it as a point location.



Print Page | Close Window