SubClassing & Adding Custom Properties To Arch Objects?

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: SubClassing & Adding Custom Properties To Arch Objects?

Post by vocx »

looo wrote: Sat Feb 10, 2018 11:30 pm ...
maybe this is also interesting for you:
https://forum.freecadweb.org/viewtopic.php?f=22&t=26021, pythonic scripted objects
https://forum.freecadweb.org/viewtopic.php?f=22&t=13238, Why doesn't freecad modules look like normal python modules?
Damn looo, these threads are gold for their historical value. They help explain why some things are written in the way they are right now, and what could be done to improve the situation.

We definitely need to improve the documentation in the wiki because it's not easy to find this type of information in the forum for easy reference.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Re: SubClassing & Adding Custom Properties To Arch Objects?

Post by paullee »

Indeed documentation is not enough though after two years I am still far from understanding what @looo pointed to :)
teh_fink
Posts: 11
Joined: Thu Jan 28, 2016 4:24 am

Re: SubClassing & Adding Custom Properties To Arch Objects?

Post by teh_fink »

damian wrote: Sat Feb 10, 2018 10:08 am

Code: Select all

import ArchWall

class SubClassArchWall(ArchWall._Wall):
…
Is this still possible in 0.19? It seems the `Wall` class has been renamed to `_Wall` and is inaccessible for importing & therefore subclassing:
https://github.com/FreeCAD/FreeCAD/blob ... ll.py#L676
Post Reply