Skip to content

gi-nx


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 ​

ParameterTypeDescription
layerNameOrIdstringName or full layer ID of the layer to duplicate
newLayerNameOrId?stringOptional 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