Macro to move object to specific coordinates with user input base point

Macro to move object to specific coordinates with user input base point

Anonymous
Not applicable
1,687 Views
3 Replies
Message 1 of 4

Macro to move object to specific coordinates with user input base point

Anonymous
Not applicable

Hi,

 

Can anyone help me with a MACRO that will

 

-move

-select all

-allow for user to select a base point

-move objects to coordinates 71'-0,1'-0,0

 

This seems close:

 

^C^C_DYNMODE;1;MOVE;_all;;\;71'-0,1'-0,0;DYNMODE;3;

 

almost works, but instead of moving the objects to those coordinates it just moves them to a seemingly random coordinate.  

 

Thanks!!

0 Likes
Accepted solutions (1)
1,688 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

I assume that's taking it as a relative-to-the-start-point displacement, in a newer version of AutoCAD.  Try it with the force-absolute-coordinates # prefix:

 

^C^C_DYNMODE;1;MOVE;_all;;\;#71'-0,1'-0,0;DYNMODE;3;

 

Alternatively, it may work to set DYNMODE to 0 rather than 1 [I'm at my older-version location at the moment, so I can't try that].

Kent Cooper, AIA
0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks Kent, but adding # before the coordinates still didn't send the objects to the right place,

 

BTW I'm using AutoCAD 2016

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

Solved the Macro.  Macro doesn't recognize the # symbol to prompt absolute coordinates so you have to preset the DYNPICOORD to 1 in the macro before the move command.  This is the solution:

 

^C^C_DYNMODE;1;DYNPICOORDS;1;MOVE;_all;;\71',1',0;DYNMODE;3;DYNPICOORDS;0

0 Likes