Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Macro Syntax Help For LAYMRG

Anonymous

Macro Syntax Help For LAYMRG

Anonymous
Not applicable

I have been struggling with a -LAYMRG macro. Here's what I need it to do:

  1. Start the -LAYMRG command
  2. Select all source objects with mouse (SELECT)
  3. On user completing the selection and pressing enter, merge those layers selected to a specific layer specified in the macro (XX - Layout).

Here's what I have so far: ^C^C-laymrg;select;n;"XX - Layout"

 

I have tried many different syntax and special characters but at the stage when it asks to select the destination layer to merge to, I can't make it select "Name" without manually typing N. I want it to do that immediately after selection has completed. Why won't the macro progress past SELECT without my input?

 

Many thanks.

0 Likes
Reply
Accepted solutions (1)
750 Views
5 Replies
Replies (5)

cadffm
Consultant
Consultant

-LAYMRG is not designd for this,

you need a more complex macro to do this, or better you need 2 macros to do this.

 

Simpler is: LAYCUR

 

Set the target layer as current layer first.

 

 

 

Sebastian

0 Likes

cadffm
Consultant
Consultant

Oh, i read it again and i see you don't understand where the problem is!

 

Please type in, by hand:

Command: -LAYMRG

 

following by: SELECT

 

Read the commandline now [F2]

 

This is the time where your macro brokes, not much later when you trying to enter N

Sebastian

0 Likes

Anonymous
Not applicable
Yeah I thought that was the issue. Using SELECT isn't proper at that point.

Thanks for the LAYCUR advice. I'm very close now.

^C^C-LAYER;S;"SC - Layout";^CLAYCUR;

The above does almost exactly what I want. I would prefer that an object selection would select everything on that layer, not just the object. I guess this is what you meant when you suggested 2 macros.

What do you think?
0 Likes

cadffm
Consultant
Consultant
Accepted solution

You can go multiple ways in with "just LT" it is really to to make a perfect solution

 

More perfect -> often more complicated

 

Example, which needs to CANCEL if you like to stop the command.

 

 

*^C^C^C_.-LAYER;_new;"XX - Layout";;_.-LAYMRG;\;_name;XX - Layout;_yes

 

 

Sebastian

Anonymous
Not applicable
That's perfect. I see what you did there. Syntax like "_.-LAYMRG" is exactly what I needed to know.

Thank you!
0 Likes