Macro for turning off layers

Macro for turning off layers

Anonymous
Not applicable
2,851 Views
7 Replies
Message 1 of 8

Macro for turning off layers

Anonymous
Not applicable

Hey can anyone tell me if its possible and how to create a macro to turn off multiple layers off?

like id like to use the same drawing for production and for my client and i work in different layers so they cant see each others text. I've been turning them off manually and hoping to be able to do it all at once.

0 Likes
Accepted solutions (2)
2,852 Views
7 Replies
Replies (7)
Message 2 of 8

steven-g
Mentor
Mentor
Accepted solution

Yes a macro can be used, but you would need to know the name of every layer you want to turn off, so it could be quite a long macro. Or if you use the same layers all the time then 'layerstates' might be a better way to quickly switch between how your layers are 'seen' this is a manual process to set up but then just a click to use.

Can you give us more information, how many layers? etc. 

Message 3 of 8

Anonymous
Not applicable

id need to turn off 5 layers for one and 6 for the other, i'm not sure what other information to give.

0 Likes
Message 4 of 8

Anonymous
Not applicable

I've looked into LAYERSTATE and it does what I would like, thank you!

0 Likes
Message 5 of 8

steven-g
Mentor
Mentor
Accepted solution

Something like this,

^C^C^C-layer;off;"Layer 1,Layer 2";;

 In this example, there is a space in the names of the layers so you need to put those in quotes, if there are no spaces then the quotes aren't really needed. You can add as many layers as you want each separated by a comma.

0 Likes
Message 6 of 8

Anonymous
Not applicable

Thanks i'll try this also

 

0 Likes
Message 7 of 8

amorrisCV55V
Participant
Participant

Is this something I just type into the AutoCAD command bar? Im not sure how to do this.

0 Likes
Message 8 of 8

marieke298
Contributor
Contributor

A macro is a button you can use to automate some tasks in autocad. You need to type everything out once and (if it's correct) you can now use your new button!

You might want to follow some video courses on making macros. For me it made a lot of things faster.

 

Hope this helps!

0 Likes