gi-nx / duplicateDrawingLayer
ts
function duplicateDrawingLayer(layerNameOrId: string, newLayerNameOrId?: string): void;Duplicates a drawing layer and its associated sections. Optionally specify a new name.
Parameters
| Parameter | Type | Description |
|---|---|---|
layerNameOrId | string | Name or full layer ID of the layer to duplicate |
newLayerNameOrId? | string | Optional new name or full layer ID for the duplicated layer |
Returns
void
Throws
Error if the new layer name already exists or the source layer does not exist