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: Change Layer of Object

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
lukas.nagiller
1594 Views, 8 Replies

MACRO: Change Layer of Object

Hey guys! 

 

I need your help please.. I'm new to macros and I need a macro which changes the layer of the current selected object(s) in AutoCAD LT..

 

And optional.. Maybe is it possible to check if an object is already selected with an "if" in the macro?

 

Please it have to be AutoCAD LT compatible.. No LISP..

8 REPLIES 8
Message 2 of 9

Hey guys! 

 

I need your help please.. I'm new to macros and I need a macro which changes the layer of the current selected object(s) in AutoCAD LT..

 

And optional.. Maybe is it possible to check if an object is already selected with an "if" in the macro?

 

Please it have to be AutoCAD LT compatible.. No LISP..

Message 3 of 9
ВeekeeCZ
in reply to: lukas.nagiller

LAYMCH or LAYCUR are built-in commands that should serve your purpose.

Message 4 of 9
hwalker
in reply to: lukas.nagiller

Use the CHPROP command.

CHPROP
Select objects: LAST 1 found

Select objects:
Enter property to change [Color/LAyer/LType/ltScale/LWeight/Thickness/TRansparency/Material/Annotative]: LAYER
Enter new layer name <STANDARD_TEXT>: REINFORCEMENT

The above changes the layer of the last object drawn

Also see the link below

CHPROP (Command) | AutoCAD 2021 | Autodesk Knowledge Network

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 5 of 9
lukas.nagiller
in reply to: hwalker

Hi! Thanks for the really fast response.. unfortunately I can't get the macro to work rather I got not enough time to figure out how does this work.. and is there a method to check if on object is already selected or not?
Thanks for your help!

Message 6 of 9
pendean
in reply to: lukas.nagiller

Select the objects.
Use the LAYER pulldown to change their layer.

Done.

Takes just as long to do as hunting and pecking at a macro button in LT. Try it.

Message 7 of 9
hwalker
in reply to: lukas.nagiller

@pendean is the easiest way, but if you really want a macro

^C^C_.select \_.change previous ;properties layer reinforcement;

The above will allow you to select objects until you finish and will then change the layer to "reinforcement". Obviously you need to change "reinforcement" to your layer

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 8 of 9
lukas.nagiller
in reply to: hwalker

I know I could get it from pulldown but we got like 200 layers in our company.. So to make the technicians life easier I make them a custom ribbon with the most important layers..

Thanks its working and my techicians will thank you!
Message 9 of 9
pendean
in reply to: lukas.nagiller

@lukas.nagiller LAYMCUR or CLAYER then LAYCUR on the objects to "move" is the method we train our users to employ instead of hunting/pecking on a dozen+ custom macro buttons in a unique panel or toolbar: they learn AutoCAD in the process too.

You might want to teach them to use SETBYLAYERMODE (System Variable) as well to "fix" blocks that don't conform.

Those buttons already exist.

HTH

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

Post to forums  

Forma Design Contest


Technology Administrators