Difference between revisions of "Std DlgParameter"

From FreeCAD Documentation
Jump to navigation Jump to search
(Marked this version for translation)
m (</translate>)
Line 27: Line 27:
 
It is possible to manipulate the Parameter Tree using the FreeCAD Python API:
 
It is possible to manipulate the Parameter Tree using the FreeCAD Python API:
  
<!--T:11-->
+
</translate>
{{Code|
+
{{Code|code=
 
.GetBool(variable,bool) # method to get boolean
 
.GetBool(variable,bool) # method to get boolean
  
<!--T:12-->
 
 
.SetBool        # method to set boolean
 
.SetBool        # method to set boolean
 
.GetString
 
.GetString
Line 39: Line 38:
 
}}
 
}}
  
<!--T:13-->
+
{{Code|code=
{{Code|
 
 
 
<!--T:14-->
 
 
.SetInt(variable, int) method to set integer
 
.SetInt(variable, int) method to set integer
 
Example: to set the height of the Addon Manager  
 
Example: to set the height of the Addon Manager  
Line 48: Line 44:
 
pref.SetInt("WindowHeight",480)
 
pref.SetInt("WindowHeight",480)
  
<!--T:15-->
 
}}
 
 
<!--T:16-->
 
 
.GetInt
 
.GetInt
 
.RemInt
 
.RemInt
 
.GetUnsigned
 
.GetUnsigned
 +
}}
  
<!--T:17-->
+
{{Code|code=
{{Code|
 
 
App.ParamGet('User Parameters:BaseApp').GetGroup()
 
App.ParamGet('User Parameters:BaseApp').GetGroup()
 
.GetContents()
 
.GetContents()
 
}}
 
}}
 +
<translate>
  
 
<!--T:9-->
 
<!--T:9-->

Revision as of 11:22, 29 October 2019

Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎polski • ‎română • ‎русский

Std DlgParameter.svg Parameter editor

Menu location
Tools → Edit parameters...
Workbenches
All
Default shortcut
None
Introduced in version
-
See also
None


Description

The parameter editor allows you to access, create, and modify the parameter table that controls different behaviors of FreeCAD and its workbenches.

The most common options can be changed from the preferences editor, but certain tweaks are only accessible through the parameter editor.

How to use

Go to the menu Tools → Edit parameters; then browse the different categories to access the variables under each category.

See fine-tuning for some parameters that can be changed.

Parameter editor.png

Scripting

It is possible to manipulate the Parameter Tree using the FreeCAD Python API:

.GetBool(variable,bool) # method to get boolean

.SetBool        # method to set boolean
.GetString
.SetString
.GetFloat
.SetFloat
.SetInt(variable, int) method to set integer
Example: to set the height of the Addon Manager 
pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons")
pref.SetInt("WindowHeight",480)

.GetInt
.RemInt
.GetUnsigned
App.ParamGet('User Parameters:BaseApp').GetGroup()
.GetContents()