AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

New Member
2 Posts
0 Kudos
Registered: ‎09-10-2008
Post 1 of 3

Script for turning on and off layers

883 Views, 2 Replies
01-18-2013 06:12 AM


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.




Liam Barham
Electrical design lead
CBI Fleetwood
Active Contributor
47 Posts
10 Kudos
Registered: ‎12-16-2003
Post 2 of 3

Re: Script for turning on and off layers

01-18-2013 07:10 AM 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!


Hope this helps!

P.S. If this did help you, remember to "Accept as Solution" and as always, "Kudos" are always appreciated!
Valued Contributor
77 Posts
8 Kudos
Registered: ‎07-04-2007
Post 3 of 3

Re: Script for turning on and off layers

01-18-2013 09:34 AM 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.









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

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


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.