Command to refresh layer list (F5)

I use files of commands like this

create some layers
make some objects

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.)


1 Like

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.

create some layers
make some objects

But I agree, this needs to be fixed, I have seen this too with scripts I have that manipulate layers.


Currently we toggle the layer filters to refresh the layer list.


Dan, I’m not seeing how to do that from the command line. Is there a way?


Thanks Helvetosaur!! That works.

But yeah it should be fixed.

Thanks Bathsheba,

This is now reported as

(No, you can’t see those bugs yet, but soon I hope you will)

Hi Bathsheba,

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:


With this:

_-RunScript ( Call Rhino.EnableRedraw(True) )

Doe this help?

– Dale

@dale Cool, I didn’t know you could do that, thanks!

It is cool, however it does not cause the layer panel to refresh.

What about

_-RunScript ( Call Rhino.Redraw() )

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).

Hi Bathsheba,

See if this works (or not):

_-Layer _New Curley,Larry,Moe,Shemp _Enter
_-RunScript ( Call Rhino.EnableRedraw(True) )

Does this help?

That works. Thanks!

OK, odd, SetRedrawOn normally should also refresh the screen, I guess that’s where the bug is… Anyway glad the workaround works.