setredrawoff
create some layers
make some objects
setredrawon
After they run, the layers exist but aren’t shown in the layer manager until F5 is pressed to refresh it. I’d like to add a command to do that into the file. Is there any command that either causes a refresh of the layer manager, or simulates pressing F5?
(Alternatively, could we get the buglet fixed? Setredrawon should refresh the layer manager if layer states were changed.)
As far as I can tell, no command available through -layer causes a refresh. Changing the order of layers does do it, but as far as I know there’s no command-line way to do that.
(Please either answer the question or don’t answer it, rather than advise me to move the layer-creating commands outside the setredrawon/off block. I actually did already think of that. In the particular case I have in front of me it’s very difficult, for reasons which you would find very boring if I described them. Thanks.)
Hi Bathsheba,
Nice to see you in here!
As a crude hack, you might try this:
Grab the attached script file, put it somewhere like your scripts folder, and then from there drag and drop it into a running Rhino instance (only 1 Rhino open). That will create an alias “RedrawScreen” which you can insert at the end of the macro which will force a screen redraw and (hopefully) refresh your layer box.
setredrawoff
create some layers
make some objects
setredrawon
redrawscreen
But I agree, this needs to be fixed, I have seen this too with scripts I have that manipulate layers.
----H
The layer redraw issue that you see when you use SetRedrawOff/SetRedrawOn will be fixed for the next service release (hopefully). In the mean time, with your scirpt, just replace this:
Does that do it? That should be the equivalent of what I posted previously, with the advantage that it doesn’t need to be stored somewhere as a script and aliased (assuming it works).
----H