AutoLisp-how to get current layer name ?

Can anyone tell me how to get the current layer name using Autolisp?

I am writting a little AutoLisp program that first saves the users current layer name, then resets the layer to a different name and then does various things. Then I want to reset the layer the user had when the program was run. I know how to set a layer to a particular name, just don't know how to get the current layer name. Thanks Jarvis

Reply to
jarvis
Loading thread data ...

(getvar "CELAYER")

.........I think. It's just the variable name. I'm almost sure it's either CELAYER or CLAYER.

You can use getvar to check, even.

Command: getvar ?

*layer*

Will list all variables with "layer" in their name.

Reply to
TomD

(getvar "CELAYER")

....or "CLAYER".........I forget which.

Reply to
TomD

Thnaks guys, I spent 2 hours trying to find this. Jarvis

Reply to
jarvis

Hi

"jarvis" skrev i en meddelelse news: snipped-for-privacy@corp.supernews.com...

Well the rest of us, type Setvar ansver ? hit enter twice and look thru page after page of most all system var's with this feeling ; "what was the bloody name for that var! ;)) Then somtimes Atomsfamily is needed to check "what's the name of that bloody function". P.C.

formatting link

Reply to
P.C.

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.