Skip to content

gi-nx


gi-nx / setDrawingLayerLocked

ts
function setDrawingLayerLocked(layerNameOrId: string, locked?: boolean): void;

Locks or unlocks an existing drawing layer Like visibility and opacity, this applies to the session and is written to the backend when the layer tree is next saved.

Parameters ​

ParameterTypeDescription
layerNameOrIdstringName or full layer ID of the drawing layer
lockedbooleanTrue to lock the layer, false to unlock it

Returns ​

void

Throws ​

Error if the layer does not exist

Example ​

typescript
rpc.invoke("setDrawingLayerLocked", ["Approved Scheme", true]);