RhinoCommon API
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)
Since: 5.0

public int AddReferenceLayer( Layer layer )
Public Function AddReferenceLayer ( layer As Layer ) As Integer
Parameters
- 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.
