Reading @yorik blog https://yorik.uncreated.net/blog/2020-009-freecad-juneand Kurt Kremitzki https://www.kwk.systems/blog/
Interested in App::Link
If I add a scripted property App::PropertyLink can that be an App::Link?
App::Link as a scripted object property.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: App::Link as a scripted object property.
I see from https://github.com/realthunder/FreeCAD_ ... i/Concepts That App::Link and App::PropertyLink are not related.
In my Workbench I have functions to create a object GDMLGmshTessellated from an Object with a Mesh or Shape. It also offers the option of changing the gmsh options and performing a re-mesh with these options. Rather than store a copy of the original object in the GDMLGmshTessellated Object it would be better to just store a link. Would I be correct that I could use App::Link for this? rather than save a copy of the original object, I guess I can just store an App::Link and access via Proxy rather than use a property. @realthunder
In my Workbench I have functions to create a object GDMLGmshTessellated from an Object with a Mesh or Shape. It also offers the option of changing the gmsh options and performing a re-mesh with these options. Rather than store a copy of the original object in the GDMLGmshTessellated Object it would be better to just store a link. Would I be correct that I could use App::Link for this? rather than save a copy of the original object, I guess I can just store an App::Link and access via Proxy rather than use a property. @realthunder
Re: App::Link as a scripted object property.
i think the @user won't ping the user. we use quotes to do that.realthunder wrote:
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: App::Link as a scripted object property.
It depends on your needs. App::Link uses App::PropertyXLink to handle auto opening of external linked file. If that's all you want, than you can just add a property of that type. App::Link provides some additional functionality, such as link array, linked object hierarchy, variants, etc. It handles internal or external linked object mostly the same way. View object linking is handled by Gui::ViewProviderLink to shared the visual representation from linked object.keithsloan52 wrote: ↑Mon Jul 13, 2020 7:14 am In my Workbench I have functions to create a object GDMLGmshTessellated from an Object with a Mesh or Shape. It also offers the option of changing the gmsh options and performing a re-mesh with these options. Rather than store a copy of the original object in the GDMLGmshTessellated Object it would be better to just store a link. Would I be correct that I could use App::Link for this? rather than save a copy of the original object, I guess I can just store an App::Link and access via Proxy rather than use a property. @realthunder
If you choose to use App::Link, you can either use App::LinkPython just like any other python extendable object, i.e. through Proxy. Or, install App::LinkExtension into some existing object, which is a more advanced way of using it.