Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Macro using same base point as previous command

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
662 Views, 3 Replies

Macro using same base point as previous command

I would like to create a macro that moves previously selected object and uses same base point as previous command. Is this even possible?

3 REPLIES 3
Message 2 of 4
pendean
in reply to: Anonymous

@ will recall the last point clicked on a screen: otherwise you will need to specify the point you want to use more specifically with a pick using coordinates (predefined) and an osnap-activated selection.

Share a more detailed example of what you are trying to do.
Message 3 of 4
Kent1Cooper
in reply to: Anonymous

If you can use a routine that incorporates the Move together with the previous command, it's pretty easy to have it save that base point and re-use it.  Otherwise, the possibility of using @ [or (getvar 'lastpoint)]  would be affected by just what the previous command was.  If it was something like Move or Copy, then @ wouldn't get you the base point from it, but the destination point, which will be later.  If it was something like Rotate or Insert, then @ would get you the base point.

Kent Cooper, AIA
Message 4 of 4
Anonymous
in reply to: Kent1Cooper

The macro at this moment:

$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_move,^C^C_move;previous;;@;)

 

The sequence works fine when I do it without the macro (by typing for example), but then I use the macro, it just moves to the left. I'm really new to Autocad macros, so help is needed. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost