Macro ForceRecompute: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 14: | Line 14: | ||
==Description== <!--T:2--> |
==Description== <!--T:2--> |
||
Sometimes |
Sometimes when a user applies changes to the model, FreeCAD does not seem to recognize/integrate them. |
||
In addition to that, the blue {{Button|[[Image:Std_Refresh.svg|24px]] [[Std_Refresh|Refresh/Recompute]]}} button remains greyed out. |
|||
But FreeCAD does not seem to recognize them. |
|||
⚫ | |||
So the blue "Recompute" icon [[File:View-refresh.svg|16px]] stayes greyed out. |
|||
⚫ | |||
<!--T:5--> |
<!--T:5--> |
||
'''Note:''' As of {{VersionPlus|0.17}} the effect of this macro can be achieved through the GUI. Right-click project in [[tree view|model tree view]], and pick {{KEY|Mark to recompute}} from the context menu. After that, press the [[Image:Std_Refresh.svg|24px]] [[Std_Refresh|Refresh/Recompute]] button. |
|||
==Usage== <!--T:3--> |
==Usage== <!--T:3--> |
Revision as of 11:59, 7 February 2020
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. (Since FreeCAD 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.) Macro version: 1.0 Last modified: 2014-09-01 FreeCAD version: All Download: ToolBar Icon Author: shoogen |
Author |
shoogen |
Download |
ToolBar Icon |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0 |
Date last modified |
2014-09-01 |
FreeCAD Version(s) |
All |
Default shortcut |
None |
See also |
None |
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 version 0.17 and above 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. After that, press the Refresh/Recompute button.
Usage
Just run the macro when needed.
Script
Macro Force_Recompute.py
# -*- coding: utf-8 -*-
# Force Recompute
# macro provided by shoogen
import FreeCAD
for obj in FreeCAD.ActiveDocument.Objects:
obj.touch()
FreeCAD.ActiveDocument.recompute()