Script to freeze layers

Script to freeze layers

Anonymous
Not applicable
3,054 Views
2 Replies
Message 1 of 3

Script to freeze layers

Anonymous
Not applicable

Hi,

I am trying to write a script to freeze all layers except "XLYP1H18". The difficulty is I don't know all the layer names as it changes in each DWG. The script below changes the current layer to "XLYP1H18" and then I am trying to freeze ALL layers (as you can't freeze the current layer this should do what I want)

---------------------------------------------------------------------------

-LAYER
Set
XLYP1H18

 

-LAYER
Freeze

 

all

---------------------------------------------------------------------------

After selecting "Freeze" the following appears on the command line...

 

Enter name list of layer(s) to freeze or <select objects>:

 

I want the script to enter "select objects" then I can use "All". I have tried a lots of combinations of spaces, returns and putting the text in quotes but with not luck.

 

Can anyone help?

Thanks in advance

M

 

0 Likes
Accepted solutions (1)
3,055 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

Use asterisk for all.
-LAYER
FREEZE
*
(enter)

Message 3 of 3

Anonymous
Not applicable

Thank you!!!!

 

🙂

0 Likes