Access spreadsheet through link to Assembly

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Marc Bassini
Posts: 136
Joined: Fri Aug 13, 2021 10:08 am

Access spreadsheet through link to Assembly

Post by Marc Bassini »

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
Attachments
dims.PNG
dims.PNG (5.9 KiB) Viewed 711 times
Marc Bassini
Posts: 136
Joined: Fri Aug 13, 2021 10:08 am

Re: Access spreadsheet through link to Assembly

Post by Marc Bassini »

'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 ?
Marc Bassini
Posts: 136
Joined: Fri Aug 13, 2021 10:08 am

Re: Access spreadsheet through link to Assembly

Post by Marc Bassini »

Finally !

=<<lnk>>.LinkedObject.Document.getObjectsByLabel(<<dims>>)[0].largeur
Post Reply