Macro ForceRecompute
{{Macro
|Name=Macro Force Recompute
|Icon=Force_Recompute.png
|Description=This small macro forces a manual recompute of the model.
Sometimes the user applies changes to the model in FreeCAD.
But FreeCAD does not seem to recognize them.
(As of (v0.17) the effect of this macro can be achieved through GUI. Right-click project in model tree view, and pick "Mark to recompute" from context menu. After that, press Recompute button.)
|Author=shoogen
|Version=1.0
|Date=2014-09-01
|FCVersion=All
|Download=[https://www.freecadweb.org/wiki/https://raw.githubusercontent.com/FreeCAD/FreeCAD-documentation/master/wiki/images/8/88/Force_Recompute.png ToolBar Icon]
}}
Description
Sometimes when a user applies changes to the model, FreeCAD does not seem to recognize/integrate them. In addition to that, the blue Refresh/Recompute button remains greyed out. Hence this small macro was designed to force a manual recompute of the model.
Note: As of (v0.17) the effect of this macro can be achieved through the GUI. Right-click project in model tree view, and pick Mark to recompute from the context menu. What this does is make the Refresh/Recompute icon active again. Now press on the Refresh/Recompute button to trigger a recompute.
Usage
Run the macro when necessary.
Script
ToolBar Icon
Macro Force_Recompute.py
{{MacroCode|code=
-- coding: utf-8 --
Force Recompute
macro provided by shoogen
import FreeCAD for obj in FreeCAD.ActiveDocument.Objects: obj.touch() FreeCAD.ActiveDocument.recompute()
}}
⏵ documentation index > Macro ForceRecompute
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Macro_ForceRecompute.md