Jump to content

Std Refresh

From FreeCAD Documentation

Std Refresh

Menu location
Edit → Recompute
Workbenches
All
Default shortcut
Ctrl+Shift+R
Introduced in version
-
See also
None

Description[edit | edit source]

The Std Refresh command recomputes selected objects (introduced in 26.3), or the active document if no objects are selected. The command is disabled if no recompute is required, but in that case the command can still be invoked through its shortcut.

Usage[edit | edit source]

  1. There are several ways to invoke the command:
    • Press the Recompute button.
    • Select the Edit → Recompute option from the menu.
    • Use the keyboard shortcut: Ctrl+Shift+R.

Options[edit | edit source]

  • If no recompute is required and the command is disabled, a recompute can be forced:
    1. Do one of the following:
      • Select one or more individual objects in the Tree View.
      • Select the document in the Tree View to include all objects.
    2. Select the Mark to Recompute option from the context menu.
    3. Invoke the now enabled command as described above.
  • Alternatively, to recompute individual objects:
    1. Select one or more individual objects in the Tree View.
    2. Select the Recompute Object from the context menu.

Notes[edit | edit source]

Scripting[edit | edit source]

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To recompute a document use the recompute method of the document object:

import FreeCAD

doc = FreeCAD.ActiveDocument
doc.recompute()

The same method is available for objects in the document:

import FreeCAD

doc = FreeCAD.ActiveDocument
for obj in doc.Objects[0:3]:
    obj.recompute()

To mark an object for recomputation use the touch method of the object. The code below corresponds to forcing a recompute by selecting the document as explained in Options:

import FreeCAD

doc = FreeCAD.ActiveDocument
for obj in doc.Objects:
    obj.touch()
doc.recompute()