AutoLisp-how to get current layer name ?

Jul 10, 2003 4 Replies

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


(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.

(getvar "CELAYER")

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

Thnaks guys, I spent 2 hours trying to find this. 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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required