hwILayer GetID

Gets the ID of a layer.

Syntax

hwILayer_handle GetID

Application

HyperWorks Tcl Query

Description

Each layer has a unique, unchangeable ID that is established when it is added to the project. The layer's ID is used for getting a handle to that layer from the hwIProject.

Returns the ID of the layer.

Example

To get the ID of a newly-added layer:
hwi GetSessionHandle mySession
mySession GetProjectHandle myProject
set layerID [myProject AddLayer]
myProject GetLayerHandle myLayer $layerID
myLayer GetID

Error

Success (0) or an error code.