Std Refresh: Difference between revisions

From FreeCAD Documentation
m ({{Docnav)
(Removed a reference to V0.19.)
 
(28 intermediate revisions by 7 users not shown)
Line 4: Line 4:
<!--T:9-->
<!--T:9-->
{{Docnav
{{Docnav
|[[Std_DuplicateSelection|Std DuplicateSelection]]
|[[Std_DuplicateSelection|DuplicateSelection]]
|[[Std_BoxSelection|Std BoxSelection]]
|[[Std_BoxSelection|BoxSelection]]
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_DuplicateSelection.png
|IconL=Std_DuplicateSelection.svg
|IconC=Freecad.svg
|IconR=Std_BoxSelection.svg
|IconR=Std_BoxSelection.svg
|IconC=Freecad.svg
}}
}}


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


==Description== <!--T:3-->


== Description == <!--T:3-->
<!--T:14-->
When used, this command recomputes all altered components on the screen and refreshes the display.
The '''Std Refresh''' command recomputes the active document. The command is disabled if the document does not require a recompute.


== How to use == <!--T:5-->
==Usage== <!--T:5-->


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


== Limitations == <!--T:6-->
==Options== <!--T:15-->
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-->
<!--T:16-->
* To force a recompute select the document or one or more objects in the [[Tree_view|Tree view]], choose the {{MenuCommand|[[Image:Std_MarkToRecompute.svg|16px]] Mark to recompute}} option from the context menu, and invoke the command.
* For objects, but not for documents, you can also choose {{MenuCommand|Recompute object}} from the same context menu.

==Notes== <!--T:17-->

<!--T:18-->
* For a macro that will recompute the active document see: [[Macro_ForceRecompute|Macro ForceRecompute]].

==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|Python]] console by using the {{incode|recompute}} method of the currently active document.
To recompute a document 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 54: Line 63:
<!--T:13-->
<!--T:13-->
{{Docnav
{{Docnav
|[[Std_DuplicateSelection|Std DuplicateSelection]]
|[[Std_DuplicateSelection|DuplicateSelection]]
|[[Std_BoxSelection|Std BoxSelection]]
|[[Std_BoxSelection|BoxSelection]]
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_DuplicateSelection.png
|IconL=Std_DuplicateSelection.svg
|IconC=Freecad.svg
|IconR=Std_BoxSelection.svg
|IconR=Std_BoxSelection.svg
|IconC=Freecad.svg
}}
}}


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

Latest revision as of 15:39, 20 May 2023

Std Refresh

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

Description

The Std Refresh command recomputes the active document. The command is disabled if the document does not 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 select the document or one or more objects in the Tree view, choose the Mark to recompute option from the context menu, and invoke the command.
  • For objects, but not for documents, you can also choose Recompute object from the same context menu.

Notes

Scripting

See also: FreeCAD Scripting Basics.

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

import FreeCAD

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