Click or drag to resize

LayerTableCreateLayer Method

Basic tool used by the add layer methods.

Namespace:  Rhino.DocObjects.Tables
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 8.6
Syntax
public int CreateLayer(
	Layer newLayer,
	LayerTableLayerType layerType,
	uint worksessionReferenceModelSerialNumber,
	uint linkedInstanceDefinitionSerialNumber
)

Parameters

newLayer
Type: Rhino.DocObjectsLayer
Settings for new layer. These are copied to the layer table entry and any user data on layer is moved to the layer table entry.
layerType
Type: Rhino.DocObjects.TablesLayerTableLayerType
Type type of layer to create.
worksessionReferenceModelSerialNumber
Type: SystemUInt32
Worksession reference model serial number, where: 0: Layer is not a reference layer. 1: Layer is a reference layer but not part of a worksession reference file. 2-1000: Reserved for future use. >1000: Worksession reference model serial number.
linkedInstanceDefinitionSerialNumber
Type: SystemUInt32
Linked instance definition serial number, where: 0: Layer is not from a liked instance definition. 1-1000: Reserved for future use. >1000: Linked instance definition serial number.

Return Value

Type: Int32
The index of the last layer created if successful, UnsetIntIndex on failure.
See Also