Click or drag to resize

LayerTableAddReferenceLayer Method (Layer)

Adds a new reference layer with specified definition to the layer table Reference layers are not saved in files.

Namespace:  Rhino.DocObjects.Tables
Assembly:  RhinoCommon (in RhinoCommon.dll)
public int AddReferenceLayer(
	Layer layer


Type: Rhino.DocObjectsLayer
definition of new layer. The information in layer is copied. If layer.Name is empty the a unique name of the form "Layer 01" will be automatically created.

Return Value

Type: Int32
>=0 index of new layer -1 layer not added because a layer with that name already exists.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.2
See Also