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

Macro to turn off all layers containing certain words

tony_prall
Observer

Macro to turn off all layers containing certain words

tony_prall
Observer
Observer

Hello, new to using macros and stumbling through this, I have a client that i do work for and every file always has certain layers i need to turn off, example i normally do *cat*  in the search to show all the layers with that word in it and select all turn off, then *dim* do the same, so forth and so on, is there a way to make a macro where i hit one button and it goes through all the layers with certain key words and turn them off? 

tony_prall_0-1700615097225.png

tony_prall_1-1700615144995.png

this is the 6 i always have to turn off and freeze.

 

0 Likes
Reply
Accepted solutions (1)
314 Views
4 Replies
Replies (4)

cadffm
Consultant
Consultant

The command is 

-LAYER

Type in, press enter and you will see the syntax.

 

Example:

'-LAYER;freeze;*dim*;;

 

 

For example, to

Sebastian

0 Likes

tony_prall
Observer
Observer

so could i just type in 

 

'-LAYER;freeze;off;*dim*;*zon*;*aisle*;*text*;*sect*;*cat*;lab*;;

 

 

and that would do them all for me? or does it not work that way?

0 Likes

Kent1Cooper
Consultant
Consultant
Accepted solution

@tony_prall wrote:

so could i just type in 

'-LAYER;freeze;off;*dim*;*zon*;*aisle*;*text*;*sect*;*cat*;lab*;;

and that would do them all for me? or does it not work that way?


Freeze and Off are separate options in a Layer command.  No reason to turn them off if they're frozen, really.  Multiple Layer names [including those with wildcards] that you want to apply the same option to need to be comma-delimited:

'-LAYER;freeze;*dim*,*zon*,*aisle*,*text*,*sect*,*cat*,lab*;;

If you do want to also turn them off, you need to invoke the Off option and list them again under that.  But at least you can combine multiple options within one Layer command:

'-LAYER;freeze;*dim*,*zon*,*aisle*,*text*,*sect*,*cat*,lab*;off;*dim*,*zon*,*aisle*,*text*,*sect*,*cat*,lab*;;

Kent Cooper, AIA

tony_prall
Observer
Observer

awesome thanks Kent, that works great!

0 Likes