AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Reply
Contributor
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 1 of 6
Accepted Solution

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

824 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*
9,836 Posts
1,219 Kudos
Registered: ‎06-29-2007
Post 2 of 6

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 3 of 6

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*
9,836 Posts
1,219 Kudos
Registered: ‎06-29-2007
Post 4 of 6

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 5 of 6

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
18 Posts
1 Kudo
Registered: ‎06-13-2012
Post 6 of 6

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!