Std DlgParameter: Difference between revisions
Renatorivo (talk | contribs) (Marked this version for translation) |
(Marked this version for translation) |
||
(36 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{UnfinishedDocu{{#translation:}}}} |
|||
<translate> |
<translate> |
||
<!--T:27--> |
|||
{{Docnav |
|||
| |
|||
|[[Std_ViewScreenShot|ViewScreenShot]] |
|||
|[[Std_Tools_Menu|Std Tools Menu]] |
|||
|IconL= |
|||
|IconR=Std_ViewScreenShot.svg |
|||
|IconC=Freecad.svg |
|||
}} |
|||
<!--T:1--> |
<!--T:1--> |
||
{{GuiCommand |
{{GuiCommand |
||
|Name= |
|Name=Std DlgParameter |
||
|MenuLocation=Tools → Edit parameters... |
|||
|Icon=Std DlgParameter.svg |
|||
|Workbenches=All |
|Workbenches=All |
||
|SeeAlso=[[Preferences_Editor|Preferences Editor]] |
|||
|MenuLocation={{StdMenu|[[Std Tools Menu|Tools]]}} → Edit parameters... |
|||
}} |
}} |
||
==Description== <!--T:20--> |
==Description== <!--T:20--> |
||
<!--T:2--> |
<!--T:2--> |
||
The |
The '''Std DlgParameter''' command opens the Parameter Editor. In the Parameter Editor the parameters that control the behavior of FreeCAD and its workbenches can be inspected and optionally removed, added or changed. The parameters are stored in a file called {{FileName|user.cfg}}, the location of this file depends on your OS. |
||
<!--T:7--> |
<!--T:7--> |
||
Working with the Parameter Editor requires some experience. For the most common parameters you can also use the more convenient [[Preferences_Editor|Preferences Editor]]. |
|||
The most common options can be changed from the [[Preferences Editor|preferences editor]], but certain tweaks are only accessible through the parameter editor. |
|||
</translate> |
|||
==Usage== <!--T:21--> |
|||
[[Image:Std_DlgParameter_dialog.png]] |
|||
<translate> |
|||
<!--T:28--> |
|||
{{Caption|The Parameter Editor dialog box}} |
|||
==Usage== <!--T:21--> |
|||
<!--T:3--> |
<!--T:3--> |
||
# Select the {{MenuCommand|Tools → [[Image:Std_DlgParameter.svg|16px]] Edit parameters...}} option from the menu. |
|||
# The Parameter Editor dialog box opens. For more information see [[#Options|Options]]. |
|||
# Optionally press the {{Button|Save to disk}} button to immediately update the {{FileName|user.cfg}} file. This is not required as FreeCAD will automatically update that file when the application closes. |
|||
# Press the {{Button|Close}} button to close the Parameter Editor. |
|||
<!--T: |
==Options== <!--T:29--> |
||
See [[Fine-tuning|fine-tuning]] to learn what parameters can be changed. |
|||
<!--T: |
===Left panel=== <!--T:30--> |
||
[[Image:Parameter_editor.png]] |
|||
<!--T:31--> |
|||
The left panel shows a tree with parameter groups and sub-groups. |
|||
<!--T: |
<!--T:32--> |
||
''The following options are available in the panel's context menu:'' |
|||
* [[Path experimental]] using the Parameter editor to enable experimental features |
|||
== |
====Expand/Collapse==== <!--T:33--> |
||
<!--T: |
<!--T:34--> |
||
# If a selected group has one or more sub-groups it can be expanded or collapsed by choosing this option from the context menu. But you can also expand and collapse the tree in the usual manner. |
|||
{{VeryImportantMessage|This section is incomplete and needs to be formulated}} |
|||
<!--T: |
====Add sub-group==== <!--T:35--> |
||
It is possible to manipulate the Parameter Tree using the FreeCAD Python API: |
|||
<!--T:36--> |
|||
</translate> |
|||
# Select a group. |
|||
{{Code|code= |
|||
# Select the {{MenuCommand|Add sub-group}} option from the context menu. |
|||
.GetBool(variable,bool) # method to get boolean |
|||
# Enter a name for the new sub-group in the dialog box that opens. |
|||
# Press the {{Button|OK}} button. |
|||
====Remove group==== <!--T:37--> |
|||
.SetBool # method to set boolean |
|||
.GetString |
|||
.SetString |
|||
.GetFloat |
|||
.SetFloat |
|||
}} |
|||
<!--T:38--> |
|||
{{Code|code= |
|||
# Select a group. |
|||
.SetInt(variable, int) method to set integer |
|||
# Select the {{MenuCommand|Remove group}} option from the context menu. |
|||
Example: to set the height of the Addon Manager |
|||
# Press the {{Button|Yes}} button in the dialog box that opens to confirm you want to remove the group (including all its sub-groups, and all parameters in the group and its sub-groups). |
|||
pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") |
|||
pref.SetInt("WindowHeight",480) |
|||
====Rename group==== <!--T:39--> |
|||
.GetInt |
|||
.RemInt |
|||
.GetUnsigned |
|||
}} |
|||
<!--T:40--> |
|||
# Select a group. |
|||
# Select the {{MenuCommand|Rename group}} option from the context menu. |
|||
# Enter a new name. |
|||
# A group can also be renamed by double-clicking it. |
|||
====Export parameter==== <!--T:41--> |
|||
<!--T:42--> |
|||
# Select a group. |
|||
# Select the {{MenuCommand|Export parameter}} option from the context menu. |
|||
# Enter a filename in the dialog box. |
|||
# Press the {{Button|Save}} button. |
|||
====Import parameter==== <!--T:43--> |
|||
<!--T:44--> |
|||
# Select a group that does not contain any sub-groups or remove them first. Any existing parameters in the group will be lost. |
|||
# Select the {{MenuCommand|Import parameter}} option from the context menu. |
|||
# Select a *.FCParam file in the dialog box. |
|||
# Press the {{Button|Open}} button. |
|||
===Right panel=== <!--T:45--> |
|||
<!--T:46--> |
|||
The right panel shows the parameters in the group selected in the left panel. If this group only contains sub-groups the right panel will be empty. |
|||
<!--T:47--> |
|||
''The following options are available in the panel's context menu:'' |
|||
====Change value==== <!--T:48--> |
|||
<!--T:49--> |
|||
# Select a parameter. |
|||
# Select the {{MenuCommand|Change value}} option from the context menu. |
|||
# Enter a new value in the dialog box that opens. |
|||
# Press the {{Button|OK}} button. |
|||
# A parameter's value can also be changed by double-clicking its 'Type' or 'Value' field. |
|||
====Remove key==== <!--T:50--> |
|||
<!--T:51--> |
|||
# Select a parameter. |
|||
# Select the {{MenuCommand|Remove key}} option from the context menu. |
|||
====Rename key==== <!--T:52--> |
|||
<!--T:53--> |
|||
# Select a parameter. |
|||
# Select the {{MenuCommand|Rename key}} option from the context menu. |
|||
# Enter a new name. |
|||
# A parameter can also be renamed by double-clicking its 'Name' field. |
|||
====New string item==== <!--T:54--> |
|||
<!--T:55--> |
|||
# Select the {{MenuCommand|New string item}} or {{MenuCommand|New → New string item}} option from the context menu. |
|||
# Enter a name in the dialog box that opens. |
|||
# Press the {{Button|OK}} button. |
|||
# Enter a value in the next dialog box. |
|||
# Press the {{Button|OK}} button. |
|||
====New float item==== <!--T:56--> |
|||
<!--T:57--> |
|||
# Select the {{MenuCommand|New float item}} or {{MenuCommand|New → New float item}} option from the context menu. |
|||
# The next steps are similar to those for a [[#New_string_item|New string item]] |
|||
====New integer item==== <!--T:58--> |
|||
<!--T:59--> |
|||
# Select the {{MenuCommand|New integer item}} or {{MenuCommand|New → New integer item}} option from the context menu. |
|||
# The next steps are similar to those for a [[#New_string_item|New string item]] |
|||
====New unsigned item==== <!--T:60--> |
|||
<!--T:61--> |
|||
# Select the {{MenuCommand|New unsigned item}} or {{MenuCommand|New → New unsigned item}} option from the context menu. |
|||
# The next steps are similar to those for a [[#New_string_item|New string item]] |
|||
====New Boolean item==== <!--T:62--> |
|||
<!--T:63--> |
|||
# Select the {{MenuCommand|New Boolean item}} or {{MenuCommand|New → New Boolean item}} option from the context menu. |
|||
# The next steps are similar to those for a [[#New_string_item|New string item]] |
|||
===Sorting=== <!--T:64--> |
|||
<!--T:65--> |
|||
By default the groups in each tree level in the left panel are sorted alphabetically, and the parameters in the right panel are sorted alphabetically as well. But the order in each panel can be reversed by clicking the 'Group' or 'Name' header respectively. |
|||
===Quick search=== <!--T:66--> |
|||
<!--T:67--> |
|||
Typing a (partial) string in this input box will fully expand the tree in the left panel and highlight all groups with names that match the entered value. If no matches are found the background of the input box will turn red. |
|||
===Find=== <!--T:68--> |
|||
<!--T:69--> |
|||
# In the left panel select the group where you want to start your search. The search direction is down. The search is not restricted to the group and its sub-groups, but rather the selected group and everything below it in the tree will be searched. |
|||
# Press the {{Button|Find...}} button. |
|||
# Enter a string in the '''Find what''' input box. The search is case-insensitive. |
|||
# Check one or more of the {{CheckBox|TRUE|Groups}}, {{CheckBox|TRUE|Names}} and {{CheckBox|TRUE|Values}} checkboxes. Note that only string values will be searched. |
|||
# Optionally (un)check the {{CheckBox|TRUE|Match whole string only}} checkbox. |
|||
# Press the {{Button|Find Next}} button to select the first group with a match. Matching parameters are not individually highlighted. Optionally repeat this until no further matches can be found. |
|||
# It is possible to start a new search without closing the dialog box. Again selecting the group from which to start searching is then usually required. |
|||
# Use the {{Button|Cancel}} button to close the dialog box. |
|||
==Notes== <!--T:70--> |
|||
<!--T:71--> |
|||
* The [[Fine-tuning|Fine-tuning]] page lists a number of parameters that may be of interest. |
|||
==Scripting== <!--T:10--> |
|||
<!--T:72--> |
|||
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:75--> |
|||
Preferences can be accessed from Python scripts using their corresponding path in the [[Std_DlgParameter|Parameter Editor]]. For example, the {{MenuCommand|Edit → Preferences → Import-Export → DXF → Import options → Join geometry}} preference appears in {{MenuCommand|Tools → Edit parameters → BaseApp → Preferences → Mod → Draft → dxfCreatePart}} and has type {{incode|Boolean}}. It can therefore be accessed in Python using the following code: |
|||
</translate> |
|||
{{Code|code= |
{{Code|code= |
||
# get: |
|||
App.ParamGet('User Parameters:BaseApp').GetGroup() |
|||
App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetBool('dxfCreatePart') |
|||
.GetContents() |
|||
# set: |
|||
App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").SetBool('dxfCreatePart', True) |
|||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:26--> |
|||
See also this [https://forum.freecadweb.org/viewtopic.php?f=22&t=44171&p=376955#p376955 forum thread] |
|||
<!--T:76--> |
|||
Finding which parameter is used to store which option from the Preferences editor can require searching a bit, but the [[Std_DlgParameter|Parameter Editor]] offers a search facility, which should help. |
|||
<!--T:77--> |
|||
It is likely a bad idea to modify the preferences of other parts of FreeCAD unless doing so at the user's request. The setter can however be used to set parameters for your own workbench, and the getter can be used to obey existing parameters. |
|||
<!--T:74--> |
|||
{{Docnav |
|||
| |
|||
|[[Std_ViewScreenShot|ViewScreenShot]] |
|||
|[[Std_Tools_Menu|Std Tools Menu]] |
|||
|IconL= |
|||
|IconR=Std_ViewScreenShot.svg |
|||
|IconC=Freecad.svg |
|||
}} |
|||
</translate> |
</translate> |
||
{{Std Base{{#translation:}}}} |
{{Std Base navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{clear}} |
Latest revision as of 07:58, 16 September 2021
|
Menu location |
---|
Tools → Edit parameters... |
Workbenches |
All |
Default shortcut |
None |
Introduced in version |
- |
See also |
Preferences Editor |
Description
The Std DlgParameter command opens the Parameter Editor. In the Parameter Editor the parameters that control the behavior of FreeCAD and its workbenches can be inspected and optionally removed, added or changed. The parameters are stored in a file called user.cfg, the location of this file depends on your OS.
Working with the Parameter Editor requires some experience. For the most common parameters you can also use the more convenient Preferences Editor.
The Parameter Editor dialog box
Usage
- Select the Tools →
Edit parameters... option from the menu.
- The Parameter Editor dialog box opens. For more information see Options.
- Optionally press the Save to disk button to immediately update the user.cfg file. This is not required as FreeCAD will automatically update that file when the application closes.
- Press the Close button to close the Parameter Editor.
Options
Left panel
The left panel shows a tree with parameter groups and sub-groups.
The following options are available in the panel's context menu:
Expand/Collapse
- If a selected group has one or more sub-groups it can be expanded or collapsed by choosing this option from the context menu. But you can also expand and collapse the tree in the usual manner.
Add sub-group
- Select a group.
- Select the Add sub-group option from the context menu.
- Enter a name for the new sub-group in the dialog box that opens.
- Press the OK button.
Remove group
- Select a group.
- Select the Remove group option from the context menu.
- Press the Yes button in the dialog box that opens to confirm you want to remove the group (including all its sub-groups, and all parameters in the group and its sub-groups).
Rename group
- Select a group.
- Select the Rename group option from the context menu.
- Enter a new name.
- A group can also be renamed by double-clicking it.
Export parameter
- Select a group.
- Select the Export parameter option from the context menu.
- Enter a filename in the dialog box.
- Press the Save button.
Import parameter
- Select a group that does not contain any sub-groups or remove them first. Any existing parameters in the group will be lost.
- Select the Import parameter option from the context menu.
- Select a *.FCParam file in the dialog box.
- Press the Open button.
Right panel
The right panel shows the parameters in the group selected in the left panel. If this group only contains sub-groups the right panel will be empty.
The following options are available in the panel's context menu:
Change value
- Select a parameter.
- Select the Change value option from the context menu.
- Enter a new value in the dialog box that opens.
- Press the OK button.
- A parameter's value can also be changed by double-clicking its 'Type' or 'Value' field.
Remove key
- Select a parameter.
- Select the Remove key option from the context menu.
Rename key
- Select a parameter.
- Select the Rename key option from the context menu.
- Enter a new name.
- A parameter can also be renamed by double-clicking its 'Name' field.
New string item
- Select the New string item or New → New string item option from the context menu.
- Enter a name in the dialog box that opens.
- Press the OK button.
- Enter a value in the next dialog box.
- Press the OK button.
New float item
- Select the New float item or New → New float item option from the context menu.
- The next steps are similar to those for a New string item
New integer item
- Select the New integer item or New → New integer item option from the context menu.
- The next steps are similar to those for a New string item
New unsigned item
- Select the New unsigned item or New → New unsigned item option from the context menu.
- The next steps are similar to those for a New string item
New Boolean item
- Select the New Boolean item or New → New Boolean item option from the context menu.
- The next steps are similar to those for a New string item
Sorting
By default the groups in each tree level in the left panel are sorted alphabetically, and the parameters in the right panel are sorted alphabetically as well. But the order in each panel can be reversed by clicking the 'Group' or 'Name' header respectively.
Quick search
Typing a (partial) string in this input box will fully expand the tree in the left panel and highlight all groups with names that match the entered value. If no matches are found the background of the input box will turn red.
Find
- In the left panel select the group where you want to start your search. The search direction is down. The search is not restricted to the group and its sub-groups, but rather the selected group and everything below it in the tree will be searched.
- Press the Find... button.
- Enter a string in the Find what input box. The search is case-insensitive.
- Check one or more of the
Groups,
Names and
Values checkboxes. Note that only string values will be searched.
- Optionally (un)check the
Match whole string only checkbox.
- Press the Find Next button to select the first group with a match. Matching parameters are not individually highlighted. Optionally repeat this until no further matches can be found.
- It is possible to start a new search without closing the dialog box. Again selecting the group from which to start searching is then usually required.
- Use the Cancel button to close the dialog box.
Notes
- The Fine-tuning page lists a number of parameters that may be of interest.
Scripting
See also: FreeCAD Scripting Basics.
Preferences can be accessed from Python scripts using their corresponding path in the Parameter Editor. For example, the Edit → Preferences → Import-Export → DXF → Import options → Join geometry preference appears in Tools → Edit parameters → BaseApp → Preferences → Mod → Draft → dxfCreatePart and has type Boolean
. It can therefore be accessed in Python using the following code:
# get:
App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetBool('dxfCreatePart')
# set:
App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").SetBool('dxfCreatePart', True)
Finding which parameter is used to store which option from the Preferences editor can require searching a bit, but the Parameter Editor offers a search facility, which should help.
It is likely a bad idea to modify the preferences of other parts of FreeCAD unless doing so at the user's request. The setter can however be used to set parameters for your own workbench, and the getter can be used to obey existing parameters.
- File: New, Open, Close, Close All, Save, Save As, Save a Copy, Save All, Revert, Import, Export,Merge project, Project information, Print, Print preview, Export PDF, Recent files, Exit
- Edit: Undo, Redo, Cut, Copy, Paste, Duplicate selection, Refresh, Box selection, Box element selection, Select All, Delete, Send to Python Console, Placement, Transform, Alignment, Toggle Edit mode, Edit mode, Preferences
- View:
- Miscellaneous: Create new view, Orthographic view, Perspective view, Fullscreen, Bounding box, Toggle axis cross, Clipping plane, Texture mapping, Toggle navigation/Edit mode, Appearance, Random color, Workbench, Status bar
- Standard views: Fit all, Fit selection, Isometric, Dimetric, Trimetric, Home, Front, Top, Right, Rear, Bottom, Left, Rotate Left, Rotate Right
- Freeze display: Save views, Load views, Freeze view, Clear views
- Draw style: As is, Points, Wireframe, Hidden line, No shading, Shaded, Flat lines
- Stereo: Stereo red/cyan, Stereo quad buffer, Stereo Interleaved Rows, Stereo Interleaved Columns, Stereo Off, Issue camera position
- Zoom: Zoom In, Zoom Out, Box zoom
- Document window: Docked, Undocked, Fullscreen
- Visibility: Toggle visibility, Show selection, Hide selection, Select visible objects, Toggle all objects, Show all objects, Hide all objects, Toggle selectability
- Toolbars: File, Edit, Clipboard, Workbench, Macro, View, Structure, Help
- Panels: Tree view, Property view, Selection view, Tasks, Python console, DAG view, Model, Report view
- Link navigation: Go to linked object, Go to the deepest linked object, Select all links
- Tree view actions: Sync view, Sync selection, Sync placement, Pre-selection, Record selection, Single document, Multi document, Collapse/Expand, Initiate dragging, Go to selection, Selection Back, Selection Forward
- Tools: Edit parameters, Save image, Load image, Scene inspector, Dependency graph, Project utility, Measure distance, Add text document, View turntable, Units calculator, Customize, Addon manager
- Macro: Macro recording, Macros, Recent macros, Execute macro, Attach to remote debugger, Debug macro, Stop debugging, Step over, Step into, Toggle breakpoint
- Help: Help, FreeCAD Website, Donate, Users documentation, Python scripting documentation, Automatic Python modules documentation, FreeCAD Forum, FreeCAD FAQ, Report a bug, About FreeCAD, What's This
![](/images/thumb/9/94/User_hub.png/24px-User_hub.png)
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub