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

Script for turning on and off layers

2 REPLIES 2
Reply
Message 1 of 3
liambarham
5475 Views, 2 Replies

Script for turning on and off layers

Hello,

Im after a simple script that i can run to turn off my DESC layer in all my drawings or any other layer for that matter.

 

Regards

Liam,

Regards
Liam Barham
Electrical design lead
BW Container Systems
2 REPLIES 2
Message 2 of 3
OP21
in reply to: liambarham

Look under  "Projects" ->"Project (Wide)  -> Utilities -> "For each drawing" there is a check box to "Run command script file" .  <You can create a simple script to turn off layers prior to this and select it using this method..  Once you have located your .scr file, click "OK" and  you can batch process some or all dwgs in your project.

You should also create another script file to turn layers back on if needed, for which the same process is used.

 

This should put you in the right direction.

Hope this helps!

Omar

Hope this helps!
Omar

P.S. If this did help you, remember to "Accept as Solution", so the answer can help others. "LIKES" are always welcomed and much appreciated! Thank-you.
Message 3 of 3
metal_pro2
in reply to: liambarham

This is a sample of what you would type in notepad and save as a script e.g. FREEZE LAYER DESC.SCR 

It makes layer 0 the current layer first to prevent errors incase DESC is current layer in a drawing and can't be frozen.

 

ZOOM

E

-LAYER

make

0

FR

DESC

                          (- this is a blank line to force an enter)

                          (- this is a blank line to force an enter and finish layer command )

 

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

Post to forums  

Autodesk Design & Make Report

”Boost