.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set current layer

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
HelloWorlddd
546 Views, 3 Replies

How to set current layer

How to set current layer to a specified layer? I mean use program complete this function.

For example there is a new layer called "myLayer", then I execute  a command, the currrent layer will be"myLayer".


Any help much appreciated.

3 REPLIES 3
Message 2 of 4
Keith.Brown
in reply to: HelloWorlddd

The easiest way to set the current layer is to modify the CLAYER system variable.

 

Application.SetSystemVariable("CLAYER", "myLayer");

 

Message 3 of 4
cdinten
in reply to: HelloWorlddd

another way is using Database.Clayer property
you just set your specified layer's objectid to this property
Message 4 of 4
HelloWorlddd
in reply to: Keith.Brown

Smiley EmbarassedThanks for your help

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost