Macros for generation properties list of active object
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Macros for generation properties list of active object
Nice! Is there a way to exclude the inherited properties? See f.e. Draft_Facebinder.
Re: Macros for generation properties list of active object
You mean properties inherited from Part feature?
1. May be add the ability to display not only the hidden type to the template?
https://wiki.freecadweb.org/index.php?t ... ction=edit
https://wiki.freecadweb.org/index.php?t ... ction=edit
From https://wiki.freecadweb.org/Part_Feature
2. Is possible to extend "Data" and "View" text with {{#switch:}} as in #top template?
/en=Data
/ru=Данные
etc on other langage...
For https://wiki.freecadweb.org/index.php?t ... ction=edit
/en=View
/ru=Вид
/fr=
/it=
/de=
etc...
1. May be add the ability to display not only the hidden type to the template?
https://wiki.freecadweb.org/index.php?t ... ction=edit
https://wiki.freecadweb.org/index.php?t ... ction=edit
From https://wiki.freecadweb.org/Part_Feature
this parameter is not hidden in FreeCAD interfaceData (hidden)Visibility (Bool): whether to display the object or not..
2. Is possible to extend "Data" and "View" text with {{#switch:}} as in #top template?
/en=Data
/ru=Данные
etc on other langage...
For https://wiki.freecadweb.org/index.php?t ... ction=edit
/en=View
/ru=Вид
/fr=
/it=
/de=
etc...
Code: Select all
{{Variable|{{{1}}}|Data|{{{2|}}}|{{#if:{{{3|}}}
|hidden
|}}}}<noinclude>
Last edited by Evgeniy on Mon Sep 06, 2021 6:48 pm, edited 3 times in total.
Re: Macros for generation properties list of active object
Of course not all objects are based on a Part Feature object. Arch_Structure and Draft_Facebinder are, but f.e. Draft_Wire and Draft_Text are not.
Removing inherited properties shortens the list, leaving only the properties that are of interest.
Removing inherited properties shortens the list, leaving only the properties that are of interest.
Re: Macros for generation properties list of active object
What other types do you mean?
Don't know how useful that is, sometimes you need more flexibility than such a template can offer: Draft_Dimension. And, contrary to the Top link, these headings typically do not occur multiple times on a single page. And where would you end, do you also want to create templates for the other standard headings (Description, Usage, etc.)?
Re: Macros for generation properties list of active object
About templates i start new topic https://forum.freecadweb.org/viewtopic.php?f=21&t=62027
Re: Macros for generation properties list of active object
OK. I see that I misunderstood your "Data" template proposal...
Re: Macros for generation properties list of active object
I think that creating such a macro is not possible at the moment. Because FreeCAD indicates that some fields are not hidden, although in fact they are hidden. I tried to create a similar macro, but it does work not correctly.
https://wiki.freecadweb.org/Macro_Wiki_ ... _Generator
Re: Macros for generation properties list of active object
This method will not give anything useful. Needs a method that allows us to find out the parent from which the object is inherited.
Code: Select all
>>> z = App.ActiveDocument.addObject("Part::Sphere","Sphere")
>>> z.getAllDerivedFrom()
['Part::Sphere']
Last edited by Evgeniy on Thu Sep 09, 2021 4:51 pm, edited 1 time in total.