Getting a Layers Handle

AutoCAD assigns every object a unique handle or ID that remains constant for as long as the object exists. You access object handles are using the Handle property:

Dim objLayer As AcadLayer Dim strLayerHandle As String

Set objLayer = ThisDrawing.Layers("0") strLayerHandle = objLayer.Handle

Handles are used extensively when working with extended entity data. Extended entity data, or Xdata, is nongraphical information that can be attached to objects by application programs.

0 0

Post a comment