Std Refresh: Difference between revisions

From FreeCAD Documentation
(Fixed GuiCommand.)
(Revised.)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>


Line 15: Line 18:
{{GuiCommand
{{GuiCommand
|Name=Std Refresh
|Name=Std Refresh
|MenuLocation={{stdMenu|[[Std_Edit_Menu|Edit]]}} → Refresh
|MenuLocation=Edit → Refresh
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|F5}} or {{KEY|Ctrl}}+{{KEY|R}}
|Shortcut={{KEY|F5}}
}}
}}


== Description == <!--T:3-->
==Description== <!--T:3-->
When used, this command recomputes all altered components on the screen and refreshes the display.


The '''Std Refresh''' command recomputes modified objects and refreshes the [[3D_view|3D view]]. The command is disabled if there are no objects that require a recompute.
== Usage == <!--T:5-->

==Usage== <!--T:5-->


<!--T:7-->
<!--T:7-->
# There are several ways to invoke the Refresh command:
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Std_Refresh.svg|16px]] [[Std_Refresh|Std Refresh]]}} button.
#* Pressing the {{KEY|F5}} keyboard shortcut
#* Select the {{MenuCommand|Edit → [[Image:Std_Refresh.svg|16px]] Refresh}} option from the menu.
#* Pressing the {{KEY|Ctrl}}+{{KEY|R}} keyboard shortcut
#* Use the keyboard shortcut: {{KEY|F5}}.
#* Pressing on the {{Button|[[Image:Std_Refresh.svg|16px]] [[Std_Refresh|Refresh]]}} button in the toolbar

#* Using the {{MenuCommand|{{StdMenu|[[Std Edit Menu|Edit]]}} → Refresh}} entry from the top menu
==Options==

* To force a recompute for an individual object or the whole document, right click the object or the document in the [[Tree_view|Tree view]], choose {{MenuCommand|Mark to recompute}} from the context menu and invoke the '''Std Refresh''' command.
* For individual objects you can also choose {{MenuCommand|Recompute object}} from the same context menu ({{Version|0.19}}).

==Notes==


* For a macro that will recompute the whole document see: [[Macro_ForceRecompute|Macro ForceRecompute]].
== Limitations == <!--T:6-->
FreeCAD will only allow Refresh when (according to the program's opinion) an alteration of a component happened.
Then the grayed-out Refresh-Icon will become blue.
To force a manual recompute you could use the macro [[Macro ForceRecompute|Force Recompute]]


== Scripting == <!--T:10-->
==Scripting== <!--T:10-->


<!--T:11-->
<!--T:11-->
{{Emphasis|See also:}} [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:12-->
<!--T:12-->
Recomputing the model can be done in [[macros|macros]] and from the [[Python console|Python console]] by using the {{incode|recompute}} method of the currently active document.
To recompute the model use the {{incode|recompute}} method of the document object.


</translate>
</translate>
{{Code|code=
{{Code|code=
import FreeCAD as App
import FreeCAD


doc = App.newDocument()
doc = FreeCAD.newDocument()
doc.recompute()
doc.recompute()
# App.ActiveDocument.recompute()
}}
}}
<translate>
<translate>
Line 65: Line 71:
}}
}}


<!--T:8-->
{{Std Base navi}}
{{Userdocnavi}}
</translate>
</translate>
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

Revision as of 09:18, 18 March 2020

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.


Std Refresh

Menu location
Edit → Refresh
Workbenches
All
Default shortcut
F5
Introduced in version
-
See also
None

Description

The Std Refresh command recomputes modified objects and refreshes the 3D view. The command is disabled if there are no objects that require a recompute.

Usage

  1. There are several ways to invoke the command:
    • Press the Std Refresh button.
    • Select the Edit → Refresh option from the menu.
    • Use the keyboard shortcut: F5.

Options

  • To force a recompute for an individual object or the whole document, right click the object or the document in the Tree view, choose Mark to recompute from the context menu and invoke the Std Refresh command.
  • For individual objects you can also choose Recompute object from the same context menu (introduced in version 0.19).

Notes

Scripting

See also: FreeCAD Scripting Basics.

To recompute the model use the recompute method of the document object.

import FreeCAD

doc = FreeCAD.newDocument()
doc.recompute()