If I add a property to a Linked Object it updates the the Linked object with the Property, is there a way to add a property to the Link?
so that the the Link has the property?
Adding property to a Linked Object.
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
Re: Adding property to a Linked Object.
It means you have broken FreeCAD version As I remember while I was setting textures via setTextures the linked object always inherited the texture. But the texture URL was stored as new custom property at main object.
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Adding property to a Linked Object.
The property is added to the Object with
And this property and value show up on the Linked Object
Code: Select all
obj.addProperty("App::PropertyString","PhysVol","GDML").PhysVol = name
-
- Veteran
- Posts: 3191
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Adding property to a Linked Object.
So, the original and the links all have the same value for the new property - changing one changes all? Is there a way to have them possess their own independent values?
Re: Adding property to a Linked Object.
You can make Link to Link but... the Link still inherits from the base object. But if you remove the base object, the first Link will be broken, but the Link to Link now get the property this is probably bug but it works
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking
Re: Adding property to a Linked Object.
To my understanding it should works - in a discussion with Realthunder about FeaturePython, a FP has a property X, add X to a Link of the FP, it become an 'independent' property for the Link itself.
Not sure where Realthunder originally discuss about that, below thread is about the feature to execute particular method() for a Link with 'independent properties values' in that Link. (This particular post is about a regression found earlier which Realthunder fixed already). Search for the post where it discuss how to add properties to Links.
[Link] of (Sketch)ObjectPython / Part FeaturePython lose its 'Proxy Methods' ?
Hope it helps
Re: Adding property to a Linked Object.
I think the LinkGroup and Link are the best features at FreeCAD so far. Single click and you can have realistic looking dowels or any other objects in place. And this works quick and is fully parametric, if you change base all dowels will change.
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking