Gui not updated

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
frwi5432
Posts: 6
Joined: Wed Jun 10, 2015 5:20 am

Gui not updated

Post by frwi5432 »

Hello,
I'm a newbie to FreeCAD and Python and want to show the visible parts of the active document from different sides with a short pause in between.
The attached macro don't produce an error but only the last specified view is visibly executed at the end of the macro.
What am I doing wrong?
Thanks for your help.

Regards,
Willy
Attachments
view.txt
(542 Bytes) Downloaded 35 times
Regards,
Willy
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Gui not updated

Post by DeepSOIC »

Hi!
this is because your script is running in the same thread as FreeCAD. So while your script causes the thread to sleep, FreeCAD sleeps too, consequently it stops processing events, which is required to render the view.
I think there is a way to force a redraw, I just don't know it.
Post Reply