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

    AutoCAD 2013/2014 DWG Format

    Reply
    Contributor
    Posts: 18
    Registered: ‎06-13-2012
    Accepted Solution

    Is there any script (command) to select all layers?

    372 Views, 5 Replies
    06-13-2012 03:14 AM

    I want to hide all layers through scripting. Firstly I have to select all layers for the same.

    So, Can any1 tell me command to select all layers?

    Please use plain text.
    *Expert Elite*
    Posts: 6,427
    Registered: ‎06-29-2007

    Re: Is there any script (command) to select all layers?

    06-13-2012 03:20 AM in reply to: vikasranga2

    Hi,

     

    with Lisp:

    (command "_-LAYER" "_OFF" "*" "_Y" "")

     

    or by typing into command line (and so also within a script)

    _-LAYER<ENTER>

    _OFF<ENTER>

    *<ENTER>

    _Y<ENTER>

    <ENTER>

     

    HTH, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    Posts: 18
    Registered: ‎06-13-2012

    Re: Is there any script (command) to select all layers?

    06-13-2012 03:34 AM in reply to: alfred.neswadba

    I run this script. It turn off only current layer, not all the layers. 

     

    I need the script, which select all layers and then turn them off.

     

    Thanks.

    Please use plain text.
    *Expert Elite*
    Posts: 6,427
    Registered: ‎06-29-2007

    Re: Is there any script (command) to select all layers?

    06-13-2012 03:38 AM in reply to: vikasranga2

    Hi,

     

    >> It turn off only current layer, not all the layers

    My message above shows two ways switching off all layers (including the current one) and that does not work in your environment? Can you show then a copy of your command-line so I can see what happend?

    Well, one sitation may be a problem, that is if you start my code while the current layer is already OFF, that may be proofed.

     

    Or do I misunderstand something?

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    Posts: 18
    Registered: ‎06-13-2012

    Re: Is there any script (command) to select all layers?

    06-13-2012 03:43 AM in reply to: alfred.neswadba

    Thanks.

     

    great, it worked.

    Please use plain text.
    Contributor
    Posts: 18
    Registered: ‎06-13-2012

    Re: Is there any script (command) to select all layers?

    06-13-2012 04:27 AM in reply to: vikasranga2

    Can I have the command to make filters?

    I need to show some specific layers. So, required script to nake filters.

     

    or

     

    Any file having all the commands?

    Please use plain text.