How to set current layer

How to set current layer

Anonymous
Not applicable
873 Views
3 Replies
Message 1 of 4

How to set current layer

Anonymous
Not applicable

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.

0 Likes
Accepted solutions (1)
874 Views
3 Replies
Replies (3)
Message 2 of 4

Keith.Brown
Advisor
Advisor
Accepted solution

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

 

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

 

Message 3 of 4

Anonymous
Not applicable
another way is using Database.Clayer property
you just set your specified layer's objectid to this property
0 Likes
Message 4 of 4

Anonymous
Not applicable

Smiley EmbarassedThanks for your help

0 Likes