Could someone show me howto macro this?

I have the isolate script running, but I find it a bit too tedious, would be nice to select a part that I want to move only the faces via SHIFT+CTRL+Selection — just by running a script or macro to temporarily toggle the inverted selection locked/masked on&off. Could someone help me with this?

Hi Hannes- I am not sure yet what all the steps are that you wish to accomplish- can you give me a blow by blow?



@pascal, there is a script for isolating (incl. saving view) and a script for unisolating.
What I would like is the following - a toggle script for firing only one command/alias

Call it ‘toggle temporarily lock all unselected’ - maybe this is possible when command is already running - comes very handy when trying to isolate one single part/polysurface to work on when CTRL-SHIFT-select several faces/edges to move them (to scale an object etc.)

Made a video here:


  1. select the desired object
  2. run the toggle - would a) invert select all other objects b) toggle them locked
  3. Work on the isolated object
  4. toggle all objects back unlocked with the same key/alias

Hi Hannes - the same script has, I believe, IsolateLock/UnisolateLock, which should help. These are built in to V6 as well.

You can put this in a button:

! _-RunPythonScript (

import rhinoscriptsyntax as rs
import scriptcontext as sc

x = False
if sc.sticky.has_key ("IsolateLockState"):
    x = sc.sticky["IsolateLockState"]

if x:
    rs.Command("UnIsolateLock Enter ")
    sc.sticky["IsolateLockState"] = False
    rs.Command("IsolateLock Enter ")
    sc.sticky["IsolateLockState"] = True


It will toggle the IsolateLock state.



Thanks for the script! @pascal — is there a way to even cut out the saved view option? I just want to lock and unlock all with this toggle and not being disturbed by being forced to original position when fired the command. Thanks for your clarification

Pascal 2nd question: when assigning an Alias to this script it won’t do anything, when pasting in the command line it works just fine. Any suggestions how I can fix this? Thanks

Yeah… aliases do not respect line breaks, I guess, so scripts may not work directly… we’ll have to jump through some hoops-

I think this should work:

Save the script text I posted to a .py file.
Make an alias, say ToggleIsolateLock:

! _-RunPythonScript ("Full path to py file in double quotes)

Does that do it?


1 Like

Hey @pascal your script doesn’t work properly now. first time I fire it view gets shifted so the object is out of sight. 2nd firing works like a charm. It’s always the same, first attempt doesn’t work, second does.


why is the gif not working properly? strange… :frowning:

@pascal, just fired the script and to the previous issue I would like to ad that with a custom C-plane set it would change the view to perspective for some strange reason. Thanks for your help or update with this. H


Probably the underlying IsolateLock ‘command’ is set to save and restore the view - run that command directly and set the save to No.


1 Like

@pascal is there a line for the Alias section like IsolateLock_SaveView-No what I can bind to a alias? Not sure about the syntax Thanks H