Macro-insert block then copy last object

Macro-insert block then copy last object

Anonymous
Not applicable
513 Views
4 Replies
Message 1 of 5

Macro-insert block then copy last object

Anonymous
Not applicable

I use blocks to label esmt widths fo momen plats and have been experimenting with creating a macro that would do this a lot easier. This is what i have so far, but its making me still click the block and right click to start the copy command. Is there any way to instert the L into the Diesel copy command so it will automaticly grab the block last created?

 

thanks for the help!

 

^C^C_insert;E10;R;\\\;1;$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_copy,^C^C_copy)

0 Likes
Accepted solutions (1)
514 Views
4 Replies
Replies (4)
Message 2 of 5

hmsilva
Mentor
Mentor

@Anonymous wrote:

I use blocks to label esmt widths fo momen plats and have been experimenting with creating a macro that would do this a lot easier. This is what i have so far, but its making me still click the block and right click to start the copy command. Is there any way to instert the L into the Diesel copy command so it will automaticly grab the block last created?

 

thanks for the help!

 

^C^C_insert;E10;R;\\\;1;$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_copy,^C^C_copy)


Hello scottysimonett and welcome to the Autodesk Community!

 

try for single copy

^C^C_insert;E10;R;\\\;_.Copy;_L;;@;

or for multiple copy

^C^C_insert;E10;R;\\\;_.Copy;_L;;_M;@;

 

Hope this helps,
Henrique

EESignature

Message 3 of 5

Anonymous
Not applicable

@hmsilva wrote:

@Anonymous wrote:

I use blocks to label esmt widths fo momen plats and have been experimenting with creating a macro that would do this a lot easier. This is what i have so far, but its making me still click the block and right click to start the copy command. Is there any way to instert the L into the Diesel copy command so it will automaticly grab the block last created?

 

thanks for the help!

 

^C^C_insert;E10;R;\\\;1;$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_copy,^C^C_copy)


Hello scottysimonett and welcome to the Autodesk Community!

 

try for single copy

^C^C_insert;E10;R;\\\;_.Copy;_L;;@;

or for multiple copy

^C^C_insert;E10;R;\\\;_.Copy;_L;;_M;@;

 

Hope this helps,
Henrique


Thanks for the help Henrique!

This just needed a tiny adjustment adding the scale modifier but it worked like a charm after that!

 

^C^C_insert;E10;R;\\\;1;_.Copy;_L;;_M;@;

 

One last thing, after playing around with it for a bit I am curious if the macro could while i was in the multiple copy command to be able to rotate the block and keep copying the multiples. I would use this macro 30 to 40 times a week and that would save a lot of time.

 

Thanks again!

0 Likes
Message 4 of 5

Anonymous
Not applicable

Played with it a bit more and found the MOCORO command, I am not too familiar with what the (GETVAR 'LASTPOINT) is using to get its base point but is seem to work in test runs. What do you think? It seems to work like your macro but it gives me the option of getting into a rotate command if I need to.

 

 

^C^C_insert;E10;R;\\\;1;_MOCORO;_L;;(GETVAR 'LASTPOINT);C;

 

Again, thanks in advance.

0 Likes
Message 5 of 5

hmsilva
Mentor
Mentor
Accepted solution

@Anonymous wrote:

Played with it a bit more and found the MOCORO command, I am not too familiar with what the (GETVAR 'LASTPOINT) is using to get its base point but is seem to work in test runs. What do you think? It seems to work like your macro but it gives me the option of getting into a rotate command if I need to.

^C^C_insert;E10;R;\\\;1;_MOCORO;_L;;(GETVAR 'LASTPOINT);C;

Again, thanks in advance.


You're welcome, scottysimonett.

 

the (GETVAR 'LASTPOINT) , from the help files:

Stores the last point specified, expressed as UCS coordinates for the current space.

You can reference the last point by entering the at symbol (@) at a point prompt.

 

therefore@, (GETVAR 'LASTPOINT) or @ should return the last point specified...

 

Henrique

 

EESignature