Is it possible create new Group and create new parameter into new group in Parameter editor from python script?
I tell about this editor:
[Solved] Is it possible create new Group and create parameter into Parameter editor from python?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Solved] Is it possible create new Group and create parameter into Parameter editor from python?
Last edited by Evgeniy on Thu Sep 16, 2021 2:18 pm, edited 1 time in total.
Re: Is it possible create new Group and create parameter into Parameter editor from python?
Have a look at the Snip macro.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Is it possible create new Group and create parameter into Parameter editor from python?
Setting a parameter that does not exist causes it to be created, including the folder hierarchy.
Re: Is it possible create new Group and create parameter into Parameter editor from python?
Hi
Property
(example on my macro)
write
read
mario
Property
(example on my macro)
write
Code: Select all
__Title__ = "FCCircularText"
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macros/FCMmacros/" + __Title__).SetInt("seTtextAlignement", seTtextAlignement) # 0, 1, 2
Code: Select all
__Title__ = "FCCircularText"
seTtextAlignement = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macros/FCMmacros/" + __Title__).GetInt("seTtextAlignement")
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: Is it possible create new Group and create parameter into Parameter editor from python?
Thanks for the detailed answers. Solved.