I have a custom feature python object with a custom function and property. If I create the object, the property is exposed, but the function is not. I have a need to run a FeaturePython object function directly from outside the object itself (rather than letting it be called from execute() or some other event callback).
As I understand FPO's, I don't think that's possible. But just in case I'm wrong, I thought I'd ask.
FeaturePython / Scripted Object question
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
FeaturePython / Scripted Object question
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: FeaturePython / Scripted Object question
You should be able to call your function through the Proxy object :
Code: Select all
my_FPO.Proxy.my_function()
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: FeaturePython / Scripted Object question
Gotcha. Works as expected. Thanks.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers