Std DlgParameter: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
(19 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{Page in progress}} |
|||
<translate> |
<translate> |
||
<!--T:27--> |
|||
{{Docnav |
{{Docnav |
||
| |
| |
||
|[[Std_ViewScreenShot| |
|[[Std_ViewScreenShot|ViewScreenShot]] |
||
|[[Std_Tools_Menu|Std Tools Menu]] |
|[[Std_Tools_Menu|Std Tools Menu]] |
||
|IconL= |
|IconL= |
||
Line 25: | Line 23: | ||
<!--T:2--> |
<!--T:2--> |
||
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 |
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--> |
||
Line 33: | Line 31: | ||
[[Image:Std_DlgParameter_dialog.png]] |
[[Image:Std_DlgParameter_dialog.png]] |
||
<translate> |
<translate> |
||
<!--T:28--> |
|||
{{Caption|The Parameter Editor dialog box}} |
{{Caption|The Parameter Editor dialog box}} |
||
Line 38: | Line 37: | ||
<!--T:3--> |
<!--T:3--> |
||
# Select the {{MenuCommand| |
# 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 user.cfg file. This is not required as FreeCAD will automatically update that file when the application closes. |
# 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. |
# Press the {{Button|Close}} button to close the Parameter Editor. |
||
==Options== |
==Options== <!--T:29--> |
||
===Left panel=== |
===Left panel=== <!--T:30--> |
||
<!--T:31--> |
|||
The left panel shows a tree with parameter groups and sub-groups. |
The left panel shows a tree with parameter groups and sub-groups. |
||
<!--T:32--> |
|||
''The following options are available in the panel's context menu:'' |
''The following options are available in the panel's context menu:'' |
||
====Expand/Collapse==== |
====Expand/Collapse==== <!--T:33--> |
||
<!--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. |
# 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==== |
====Add sub-group==== <!--T:35--> |
||
<!--T:36--> |
|||
# Select a group. |
# Select a group. |
||
# Select the {{MenuCommand|Add sub-group}} option from the context menu. |
# Select the {{MenuCommand|Add sub-group}} option from the context menu. |
||
# Enter |
# Enter a name for the new sub-group in the dialog box that opens. |
||
# Press the {{Button|OK}} button. |
# Press the {{Button|OK}} button. |
||
====Remove group==== |
====Remove group==== <!--T:37--> |
||
<!--T:38--> |
|||
# Select a group. |
# Select a group. |
||
# Select the {{MenuCommand|Remove group}} option from the context menu. |
# Select the {{MenuCommand|Remove group}} option from the context menu. |
||
# Press the {{Button|Yes}} button in the dialog box that |
# 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). |
||
====Rename group==== |
====Rename group==== <!--T:39--> |
||
<!--T:40--> |
|||
# Select a group. |
# Select a group. |
||
# Select the {{MenuCommand|Rename group}} option from the context menu. |
# Select the {{MenuCommand|Rename group}} option from the context menu. |
||
Line 75: | Line 80: | ||
# A group can also be renamed by double-clicking it. |
# A group can also be renamed by double-clicking it. |
||
====Export parameter==== |
====Export parameter==== <!--T:41--> |
||
<!--T:42--> |
|||
# Select a group. |
# Select a group. |
||
# Select the {{MenuCommand|Export parameter}} option from the context menu. |
# Select the {{MenuCommand|Export parameter}} option from the context menu. |
||
# Enter a filename the dialog box. |
# Enter a filename in the dialog box. |
||
# Press the {{Button|Save}} button. |
# Press the {{Button|Save}} button. |
||
====Import parameter==== |
====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 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 the {{MenuCommand|Import parameter}} option from the context menu. |
||
Line 89: | Line 96: | ||
# Press the {{Button|Open}} button. |
# Press the {{Button|Open}} button. |
||
===Right panel=== |
===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. |
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:'' |
''The following options are available in the panel's context menu:'' |
||
====Change value==== |
====Change value==== <!--T:48--> |
||
<!--T:49--> |
|||
# Select a parameter. |
# Select a parameter. |
||
# Select the {{MenuCommand|Change value}} option from the context menu. |
# Select the {{MenuCommand|Change value}} option from the context menu. |
||
# Enter a new value in the dialog box that |
# Enter a new value in the dialog box that opens. |
||
# Press the {{Button|OK}} button. |
# Press the {{Button|OK}} button. |
||
# A parameter's value can also be changed by double-clicking its 'Type' or 'Value' field. |
# A parameter's value can also be changed by double-clicking its 'Type' or 'Value' field. |
||
====Remove key==== |
====Remove key==== <!--T:50--> |
||
<!--T:51--> |
|||
# Select a parameter. |
# Select a parameter. |
||
# Select the {{MenuCommand|Remove key}} option from the context menu. |
# Select the {{MenuCommand|Remove key}} option from the context menu. |
||
====Rename key==== |
====Rename key==== <!--T:52--> |
||
<!--T:53--> |
|||
# Select a parameter. |
# Select a parameter. |
||
# Select the {{MenuCommand|Rename key}} option from the context menu. |
# Select the {{MenuCommand|Rename key}} option from the context menu. |
||
Line 115: | Line 127: | ||
# A parameter can also be renamed by double-clicking its 'Name' field. |
# A parameter can also be renamed by double-clicking its 'Name' field. |
||
====New string item==== |
====New string item==== <!--T:54--> |
||
<!--T:55--> |
|||
# Select the {{MenuCommand|New string item}} or {{MenuCommand|New → New string item}} option from the context menu. |
# 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 |
# Enter a name in the dialog box that opens. |
||
# Press the {{Button|OK}} button. |
# Press the {{Button|OK}} button. |
||
# Enter a value in the next dialog box. |
# Enter a value in the next dialog box. |
||
# Press the {{Button|OK}} button. |
# Press the {{Button|OK}} button. |
||
====New float item==== |
====New float item==== <!--T:56--> |
||
<!--T:57--> |
|||
# Select the {{MenuCommand|New float item}} or {{MenuCommand|New → New float item}} option from the context menu. |
# 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]] |
# The next steps are similar to those for a [[#New_string_item|New string item]] |
||
====New integer 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. |
# 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]] |
# The next steps are similar to those for a [[#New_string_item|New string item]] |
||
====New unsigned 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. |
# 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]] |
# The next steps are similar to those for a [[#New_string_item|New string item]] |
||
====New Boolean 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. |
# 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]] |
# The next steps are similar to those for a [[#New_string_item|New string item]] |
||
===Sorting=== |
===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. |
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=== |
===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. |
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=== |
===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 |
# 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. |
# Press the {{Button|Find...}} button. |
||
# Enter a string in the '''Find what |
# 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. |
# 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. |
# Optionally (un)check the {{CheckBox|TRUE|Match whole string only}} checkbox. |
||
Line 162: | Line 182: | ||
# Use the {{Button|Cancel}} button to close the dialog box. |
# Use the {{Button|Cancel}} button to close the dialog box. |
||
==Notes== |
==Notes== <!--T:70--> |
||
<!--T:71--> |
|||
* The [[Fine-tuning|Fine-tuning]] page lists a number of parameters that may be of interest. |
* The [[Fine-tuning|Fine-tuning]] page lists a number of parameters that may be of interest. |
||
==Scripting== <!--T:10--> |
==Scripting== <!--T:10--> |
||
<!--T:72--> |
|||
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
||
<!--T:75--> |
|||
For a scripting example see [[Std_SelBoundingBox|Std SelBoundingBox]]. |
|||
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= |
|||
# get: |
|||
App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetBool('dxfCreatePart') |
|||
# set: |
|||
App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").SetBool('dxfCreatePart', True) |
|||
}} |
|||
<translate> |
|||
<!--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 |
{{Docnav |
||
| |
| |
||
|[[Std_ViewScreenShot| |
|[[Std_ViewScreenShot|ViewScreenShot]] |
||
|[[Std_Tools_Menu|Std Tools Menu]] |
|[[Std_Tools_Menu|Std Tools Menu]] |
||
|IconL= |
|IconL= |
||
Line 184: | Line 223: | ||
{{Std Base navi{{#translation:}}}} |
{{Std Base navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{clear}} |
Latest revision as of 07:58, 16 September 2021
Std DlgParameter |
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
- 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