Workflow improvement- OneLayerWork command

the idea of this proposed command is to quickly work on single layer and locking other layers with a single command just like Onelayeron command do the function to turning off all other layer except the one selected.

Also, the locked behaviour can be like- only lock object for selection but when we are executing any command like ExtrudeCrv or Extrudesrf, the subobjects of the locked layer should be selectable so we can utilize them to make new objects.

Hello- you can try a macro like this with a bit of Python

-_RunPythonScript (
import scriptcontext as sc
import rhinoscriptsyntax as rs

layer = rs.GetLayer()
if layer:
    layers = sc.doc.Layers
    for layer in layers:
        if not layer.IsCurrent:
            layer.IsLocked = True



1 Like

Hello- what I posted is a macro you can put on a button - it is not intended to run from the script editor. If you want to run it directly without the Rhino command -RunPythonScript, remove line 1 and line 14 in your image.