• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD Electrical

    Reply
    New Member
    Posts: 2
    Registered: ‎09-10-2008

    Script for turning on and off layers

    138 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
    Please use plain text.
    Contributor
    opavlica
    Posts: 18
    Registered: ‎12-16-2003

    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

    Please use plain text.
    Valued Contributor
    Posts: 62
    Registered: ‎07-04-2007

    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 )

     

    Please use plain text.