Function ActLayer returns a handle to the currently active layer in a document.
FUNCTION ActLayer : HANDLE;def vs.ActLayer():
return HANDLEFor changing the active layer you can use Layer.
resultH := ActLayer;activeLayerName = vs.GetLName( vs.ActLayer() )
if ( objH == None ) or ( vs.IsNewCustomObject( vs.GetName( objH ) ) ):
containerHandle = vs.ActLayer()See also in tutorials: 10. Iterate the Drawing and Report a Summary, 23. Count Objects by Criteria (Formula-Driven), 25. Geometric Property Extraction Table, 27. Formatted Wall Schedule
VS Functions: ActiveClass | ActSymDef | GetLName
Availability: from All Versions