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
| Parameter | Type | Description |
|---|---|---|
layerNameOrId | string | Name or full layer ID of the drawing layer |
locked | boolean | True 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]);