RhinoCommon API
LayerTableDuplicate Method (Int32, Boolean, Boolean) |
Duplicates, or copies, a layer. Duplicated layers are added to the document.
Namespace: Rhino.DocObjects.Tables
Assembly: RhinoCommon (in RhinoCommon.dll)
Since: 6.18

public int[] Duplicate( int layerIndex, bool duplicateObjects, bool duplicateSublayers )
Public Function Duplicate ( layerIndex As Integer, duplicateObjects As Boolean, duplicateSublayers As Boolean ) As Integer()
Parameters
- layerIndex
- Type: SystemInt32
The index of the layer to duplicate. - duplicateObjects
- Type: SystemBoolean
If true, then layer objects will also be duplicated and added to the document. - duplicateSublayers
- Type: SystemBoolean
If true, then all sub-layers of the layer will be duplicated.
Return Value
Type: Int32The indices of the newly added layers if successful, an empty array on failure.
