AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Reply
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 1 of 6 (782 Views)
Accepted Solution

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

782 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?

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 -

*Expert Elite*
Alfred.NESWADBA
Posts: 9,420
Registered: ‎06-29-2007
Message 2 of 6 (781 Views)

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
-------------------------------------------------------------------------
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 3 of 6 (780 Views)

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.

*Expert Elite*
Alfred.NESWADBA
Posts: 9,420
Registered: ‎06-29-2007
Message 4 of 6 (778 Views)

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
-------------------------------------------------------------------------
Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 5 of 6 (773 Views)

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.

Contributor
vikasranga2
Posts: 18
Registered: ‎06-13-2012
Message 6 of 6 (765 Views)

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?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!