Isolate objects command question

I have a macro installed that was created by @pascal to isolate objects (super helpful), and I would like to see if there’s a way to set my Rhino up so Alt+Q executed the Isolate command, and pressing Alt+Q again executed the Unisolate command (and pressing Alt+Q again would execute the Isolate command, etc.).

This is how the isolate command works for 3dsMax, so I’m trying to create some continuity b/w softwares.

Hello - not without a script. You can put this in a text file, saved with a .py extension:

import rhinoscriptsyntax as rs
import scriptcontext as sc


x = False
if sc.sticky.has_key('ISOLATE_STATE'):
    x = sc.sticky['ISOLATE_STATE']
if x:
    rs.Command('_UnIsolate')
    sc.sticky['ISOLATE_STATE'] = False
else:
    rs.Command('_Isolate')
    sc.sticky['ISOLATE_STATE'] = True

And point your Alt-Q at that file using

_-RunPythonScript "Full path to py file inside double-quotes"

It will toggle between running Isolate and Unisolate.

-Pascal

Thank you @pascal

For the second part of your post where you say to point Alt-Q toward the command to run the Python script, is there a tutorial online on how to set that up?

Hello - that is in Options > Keyboard page -
https://docs.mcneel.com/rhino/7/help/en-us/index.htm#options/keyboard.htm?Highlight=Keyboard%20shortcut

-Pascal

If I don’t see Alt-Q as a possible alias in the Options > Keyboard menu, does that mean I need to choose something different?

Oh, yeah, I guess you will need to chose something different- no Alts available… never noticed that.

-Pascal

Is there a way to make of version of this that would isolate objects in details only? I want to have a hotkey to isolate and unisolate in the viewports, and another to do the same but in details.