Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 902 Bytes

File metadata and controls

37 lines (29 loc) · 902 Bytes

GetLayer

Description

Function GetLayer returns a handle to the layer of the referenced object.

FUNCTION GetLayer(h : HANDLE): HANDLE;
def vs.GetLayer(h):
    return HANDLE

Parameters

Name Type Description
h HANDLE Handle to object.

Remarks

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.)

Examples

VectorScript

LayerHandle:=GetLayer(ObjHd);

Python

LayerHandle = vs.GetLayer(ObjHd)

Version

Availability: from All Versions

Category