Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Macro Syntax Help For LAYMRG

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
588 Views, 5 Replies

Macro Syntax Help For LAYMRG

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.

5 REPLIES 5
Message 2 of 6
cadffm
in reply to: Anonymous

-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

Message 3 of 6
cadffm
in reply to: Anonymous

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

Message 4 of 6
Anonymous
in reply to: cadffm

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?
Message 5 of 6
cadffm
in reply to: Anonymous

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

Message 6 of 6
Anonymous
in reply to: cadffm

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

Thank you!

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report