AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

Reply
New Member
liambarham
Posts: 2
Registered: ‎09-10-2008
Message 1 of 3 (738 Views)

Script for turning on and off layers

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

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
CBI Fleetwood
Active Contributor
opavlica
Posts: 42
Registered: ‎12-16-2003
Message 2 of 3 (733 Views)

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!

Omar

Valued Contributor
metal_pro2
Posts: 66
Registered: ‎07-04-2007
Message 3 of 3 (721 Views)

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.

 

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 )

 

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.

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