Hello
How can I acccess the aliases of a spreadsheet throught a link to an external assembly ?
<<poignée [tiroir]>>.<<Parts>>.<<dims>>.longueur doesn't work in the following example.
Thanks
Access spreadsheet through link to Assembly
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 136
- Joined: Fri Aug 13, 2021 10:08 am
Access spreadsheet through link to Assembly
- Attachments
-
- dims.PNG (5.9 KiB) Viewed 711 times
-
- Posts: 136
- Joined: Fri Aug 13, 2021 10:08 am
Re: Access spreadsheet through link to Assembly
'poignée [tiroir]' has been replaced by 'lnk' for simplicity
I found I can access the value I need with the following expression :
=<<lnk>>.LinkedObject.LinkedChildren[2].LinkedChildren[0].largeur
which is a bit too much hardcoded.
I would prefer something like :
=<<lnk>>.LinkedObject.findObject(<<dims>>).largeur
How can I achieve that ?
I found I can access the value I need with the following expression :
=<<lnk>>.LinkedObject.LinkedChildren[2].LinkedChildren[0].largeur
which is a bit too much hardcoded.
I would prefer something like :
=<<lnk>>.LinkedObject.findObject(<<dims>>).largeur
How can I achieve that ?
-
- Posts: 136
- Joined: Fri Aug 13, 2021 10:08 am
Re: Access spreadsheet through link to Assembly
Finally !
=<<lnk>>.LinkedObject.Document.getObjectsByLabel(<<dims>>)[0].largeur
=<<lnk>>.LinkedObject.Document.getObjectsByLabel(<<dims>>)[0].largeur