Function GetLayer returns a handle to the layer of the referenced object.
FUNCTION GetLayer(h : HANDLE): HANDLE;def vs.GetLayer(h):
return HANDLE| Name | Type | Description |
|---|---|---|
| h | HANDLE | Handle to object. |
Care should be taken when using this call in the code for an object. If an object is cut-n-pasted or inserted from the object browser, it has to regenerate before it is actually in a layer, in which case GetLayer(h) will return a nil handle. So always check that you have a valid handle before proceeding. (This may have been fixed -- ask Jeff Koppi about this.)
LayerHandle:=GetLayer(ObjHd);LayerHandle = vs.GetLayer(ObjHd)Availability: from All Versions