I don’t have Rhino for Mac but I’m trying to train someone who does. I have a file of Rhino commands that works for me and doesn’t work for her, and one problem is it can’t exit a command. We see histories like this (italics for what’s in our command file):
Command: -layer
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=No )current
Layer name to set current ( List Select )backbone
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=No )_EnterEnd
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=No )
The -layer command succeeded but EnterEnd didn’t exit it, -layer is still re-prompting for a layer option. In her Mac install no combination of Enter, EnterEnd, !'s, and/or _'s exits. Any of them works in my Windows install, I didn’t know EnterEnd exists until today.
I’m stumped. Any advice?
Update: it seems Enter works correctly to end a command in MacroEditor, but not from ReadCommandFile.
Apple macOS Version 26.5.2 (Build 25F84) (Physical RAM: 16GB)
Mac Model Identifier: MacBookPro16,1
Language: en-US (MacOS default)
.NET 8.0.14
Metal GPU Family Apple 0
Metal GPU Family Common 3
Metal GPU Family Mac 2
Graphics processors
Intel UHD Graphics 630 (1536 MB)
AMD Radeon Pro 5500M (4 GB)
Color LCD (1792 x 1120 @ 59.00Hz)
GPU Vendor: AMD
USB devices
Apple Inc.: Apple T2 Controller
Apple Inc.: Ambient Light Sensor
Apple Inc.: FaceTime HD Camera (Built-in)
Apple: Headset
Apple: Unnamed Device
Apple Inc.: Touch Bar Display
Apple Inc.: Touch Bar Backlight
Apple Inc.: Apple Internal Keyboard / Trackpad
A command file with the -Layer Current "Layer 02" EnterEnd macro that was written on my PC works correctly when read by ReadCommandFile on my Mac.
Could you post the text file so that we can take a closer look?
-wim
Attached please find the test file that I’m using.
When read by ReadCommandFile, it produces the following output:
Command: ReadCommandFile
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=Yes )-layer
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=Yes )on
Layer name or list of layers to turn on ( List )rib
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=Yes )EnterEnd
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=Yes )Selnone
If I copy the content into my MacroEditor, it works as expected:
Command: MacroEditor
Command: -layer
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=No )on
Layer name or list of layers to turn on ( List )rib
Choose layer option ( List Current On Off Lock Unlock Color Material Linetype PrintColor PrintWidth NewDetailOn NewDetailOff ModelOn ModelOff New Rename Delete Collapse Expand Visible=No )EnterEnd
Command: Selnone
Hi Nina -
I launch Rhino 8 and start a new model from a default template. I create a box and select it. I then create a new layer named “rib” and turn that off.
When I then run ReadCommandFile and select that text, the “rib” layer gets turned on and the selected box is unselected.
I see that the “Selnone” command is printed on the same line as the layer command options, but apart from that, this seems to do what it is supposed to do. Or are you seeing something else?
FWIW, when I do this same procedure in Rhino 9, the command line is correct:
Thanks so much for looking at this. In your screenshot it looks like “Choose layer option” is repeated after EnterEnd. Shouldn’t that have ended the -layer command?
It’s still different from Nina’s history which does not show a Command: before the last SelNone. In her example I believe the SelNone command does work, but also the -layer is still active, Rhino never properly returns to the command line.
Thank you for testing it, Wim.
Correct: the SelNone command does work for me as well despite appear to be called inside the previous -layer command. But if the script gets bigger, it becomes really hard to read through the output due to these nested commands.
I concur that reading through the command history is not much fun, especially in the macOS version of Rhino. I’m not sure why you’d want to do that for a larger macro, though.
Is the macro getting stuck at some point, or is the final output as expected?
If this is getting stuck at some point, we’d need the more complex macro file.
-wim
The problem is that the -layer command is not exited, and subsequent commands are fed not to the Rhino command line, but to the -layer prompt. A very limited subset of commands (which includes SelNone) work in that context.
What we’re pointing to is that the -layer prompt of “Choose layer option…” reappearsafter EnterEnd. It should not be there, that command should be finished, but it’s there in both Nina’s and your example.
Nina, could you do an example showing a command failing after the -layer?