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

6.17 CADAddLayer

CADAddLayer adds an empty Layer to a drawing.

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

The mode of the new layer is kCADLayerModeEditable.

CADAddLayer doesn’t set the current layer. You may have to call CADSetCurrentLayer separately.

Related methods
CADAddSubLayer, CADRemoveLayer, CADGetLayers, CADGetSubLayers, CADGetLayerAttributes, CADSetLayerAttributes, CADGetGrid, CADSetGrid, CADGetLayerKey, CADSetLayerKey, CADGetLayerOrder, CADSetLayerOrder, CADGetCurrentLayer, CADSetCurrentLayer.