[Solved] Disabling auto-updates in Sketcher by default

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

[Solved] Disabling auto-updates in Sketcher by default

Post by Joel_graff »

So is it possible to disable sketcher auto-updates in Python?

I ask because I have objects which depend on a sketch and I don't want them rebuilding every time something in the Sketch changes - only when it closes. Of course, this can be achieved by unchecking the 'Auto-Update' box, but I'd rather it were disabled by default. There's no option to do so in the document preferences... Can it be done in Python?
Last edited by Joel_graff on Thu Jan 17, 2019 8:25 pm, edited 1 time in total.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Disabling auto-updates in Sketcher by default

Post by Gift »

Code: Select all

FreeCAD.ParamGet('User parameter:BaseApp/Preferences/Mod/Sketcher').SetBool('AutoRecompute', False)
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

[Solved] Re: Disabling auto-updates in Sketcher by default

Post by Joel_graff »

Gift wrote: Thu Jan 17, 2019 8:14 pm

Code: Select all

FreeCAD.ParamGet('User parameter:BaseApp/Preferences/Mod/Sketcher').SetBool('AutoRecompute', False)
Works like a charm! Thanks!
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply