AutoCAD 2013/2014/2015

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

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

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

*Expert Elite*
Alfred.NESWADBA
Posts: 8,909
Registered: ‎06-29-2007
Message 2 of 6 (679 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 (678 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: 8,909
Registered: ‎06-29-2007
Message 4 of 6 (676 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 (671 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 (663 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?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements

    Come hangout with Autodesk Support Specialist and AutoCAD guru Volker Cocco, to learn about Precision Drafting: Object Snaps and Object Tracking on July 31 @ 11:00 AM PST.

    Click here for registration information!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube