Rhinoscript EnableRedraw and SetView behaviour change

Hi,

I have several Rhinoscripts that are using Rhino.EnableRedraw in order to disable show what my scripts are building and improve performance.
I’m also using:
Rhino.Command "-_SetView ....."

Now I see that after use the command above redraw is enabled. This is a change in the previous behaviour. Is it a bug?

Thank you!
Jordi

Hi @Jordi_Llonch,

What version did/does this work in and what version does this not work in?

Can you provide a simple, short script that we can run here that repeats what you are seeing?

Thanks,

– Dale

Hi @dale,

Now I see that the problem appears after insert some file.

Here you can see the script to reproduce it (the file inserted just contains a box):

Call Main()
Sub Main()
    Rhino.EnableRedraw False
    Rhino.Command "-_Insert _File=_Yes c:\jordi.3dm O _Enter w0,0,1 _Scale 10 0", 1
End Sub

I cannot say exactly what it is the version that it works probably any version before SR24. Now I’m using SR29.

Thanks,
Jordi

This seems to work as expected using an SR30 release candidate:

Sub Main()
	Rhino.EnableRedraw False
	Rhino.Command "-_Insert _File=_Yes c:\jordi.3dm O _Enter w0,0,1 _Scale 10 0", 1
	Rhino.GetString "Press <Enter> to continue"
	Rhino.EnableRedraw True
End Sub

– Dale