Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

active layer property?

Status
Not open for further replies.

vbcad

Technical User
Jul 12, 2002
159
US
Why will this not work to make the zero layer the current layer? This seems to be the easiest way to make it current. the layer is not frozen or off. What other coding do i need if any?

ThisDrawing.ActiveLayer.Name = "0"
 
Hi vbcad,

Try this:

Code:
ThisDrawing.ActiveLayer = ThisDrawing.Layers("0")

or

Code:
Dim lyr as AcadLayer

Set lyr = ThisDrawing.Layers("0")

ThisDrawing.ActiveLayer = lyr


ActiveLayer requires a layer object, not a string value.

HTH
Todd
 
THANKS. I THOUGHT IT WAS TOO SIMPLE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top