SetCurrentLayerIndex not updating Layer Table Rendering

Good Morning,

When we call SetCurrentLayerIndex we are finding that the layer table does not update for up to 5 seconds - presumably this is because there is a delay in Rhino re-rendering the layer table? If we click on different layers in the Layers window the rendering is triggered (for that layer) and we can see the change almost instantly.
Is there any way to trigger a re-rendering of the Layer Table?


I’m not sure I understand what is going on. Is the layer you are setting current locked or hidden prior to setting? If so, Rhino will turn on and unlock the layer, thus potentially triggering a redraw. Setting a current layer also triggers a RhinoDoc.LayerTableEvent event. So any plug-in you have loaded might be watching and reacting to this.

What exactly does this mean? If you want to redraw the document, just use RhinoDoc.Redraw().

– Dale

Hi Dale, I’d like to redraw this part of the Rhino GUI
It doesn’t seem to get redrawn once When i call to SetCurrentLayerIndex

It also appears to only redraw line by line so i am able to make Rhino appear to have multiple “Current” Layers (or none)


Does this help?


If not, please provide a simple sample that repeats the issue.


– Dale

1 Like

Excellent, that’s done the trick :slight_smile: