EnableRedraw Python




I am using Rhino 6 WIP

I have a few

“rs.EnableRedraw = False”

scattered throughout my program, and none of:

“rs.EnableRedraw = True”

However, Geometry is still being drawn to the screen. I was wondering if maybe I have an error in the way I’m writing this? I’ve seen a few different documentations for this including: rs.EnableRedraw(False), rs.EnableRedraw = “False”. I’ve tried a few of them but with no luck. I’m using Python.

I’m looking at this page for the documentation: http://developer.rhino3d.com/api/RhinoScriptSyntax/win/#document-EnableRedraw

If I try rs.EnableRedraw(False) i get an error: “bool is not callable”



I found a solution already, thanks anyway!

For those wondering I used this instead:

scriptcontext.doc.Views.RedrawEnabled = False

(Giulio Piacentino) #3

Hi @Jack_Perry

You should not use rs.EnableRedraw = True. You should use rs.EnableRedraw(True). The first assigns True to the function definition, thereby making the EnableRedraw() function later unusable. You should just call it, with the mentioned code.



Giulio Piacentino
for Robert McNeel & Associates


Hi Piac,

Thanks for your response. I’ve already solved this issue though as seen above.

It seems like (at least for me), rs.EnableRedraw(True) is not working in Rhino 6 WIP, as you get the error “bool is not callable”, so I used “scriptcontext.doc.Views.RedrawEnabled = False” instead, and it works fine.


This is working for me here (no error message; 6.0.17150.8211, 30-05-17):

import rhinoscriptsyntax as rs

Did you assign rs.EnableRedraw = False earlier in the script?
Does it continue to do this after you have completely closed Rhino, re-opened it and just run the snippet I posted above?


(Steve Baer) #6

Giulio’s reply is accurate and correct. Your script was reassigning the function EnableRedraw into a bool variable by calling rs.EnabledRedraw = False. Your alternate approach will also work, and is pretty much exactly what the rs.EnableRedraw function does.


This must have been the issue Helvetosaur! I must have set it to false at an earlier part in the script. Thanks for the reply.