Next: , Previous: CADAddString, Up: CAD areas and methods

6.24 CADAddSubLayer

CADAddSubLayer adds an empty Sublayer to a Layer in a drawing.

IO Parameter Type Description
in theCADArea longint Area ID
in theLayerID longint Layer ID
in theSubLayerName Str255 Name of the new sublayer, up to 255 characters long (need not be unique)
out theNewSubLayerID longint Sublayer ID of the new sublayer
out function result OSErr Error result code, also see Error handling

The mode of the new sublayer is kCADLayerModeEditable (but sublayers are restricted by both the layer mode and the sublayer mode).
Unlike layers, sublayers aren’t ruled by a drawing order.

Related methods
CADAddLayer, CADRemoveLayer, CADGetLayers, CADGetSubLayers, CADGetLayerAttributes, CADSetLayerAttributes, CADGetLayerKey, CADSetLayerKey, CADGetLayerOrder, CADSetLayerOrder, CADGetCurrentLayer, CADSetCurrentLayer.