rs.Enable Redraw C#/RhinoCommon eqivalent

Whats the RhinoCommon/C# equivalent for the rhinoscriptsyntax/Python statement:

rs.EnableRedraw(enable=False)

//draw something

rs.EnableRedraw(enable=True)

I tried

Rhino.DocObjects.Tables.ViewTable.EnableRedraw(false, true, true);

but the method is not static so I need to create an instance of well… what exactly? I suppose the active view?

Thanks for any hints and tips!
Best,
aai

You’re after an instance of the RhinoDoc you want to affect.

In the above example doc.Views.EnableRedraw() is what you’re after.

Great, works well. Thanks Travis!

1 Like