I copied this to Expressions wiki page. Almost as-is.wmayer wrote:It's possible that you have a spreadsheet in one document and reference values from there in other documents.
Important note: You use a document's name to reference it from other documents. Now, when saving the document the first time you choose a certain file name and this is usually different to "Unnamed1" (or its translated version) and then the links are lost after reopening it. So, it's recommended to create first the master document, create a spreadsheet, save and close it. After reopening the name is set to the above file name. Afterwards you can still make changes and save the file but you shouldn't rename it.
Then create the further documents where you want to add expressions to. Assuming you named the master document "master" you can access an alias like this: master#Spreadsheet.Length
Unfortunately, the integrated is more confusing than helping because it always gives parser errors or claims that this or that doesn't exist. So, just continue on typing. When you are finished and the content is correct the OK suddenly becomes active.
Of course, it's up to you to load the corresponding documents later when you want to change anything.
Code: Select all
You've actually found a way to inject python code; not good, but not sure if this is a security issue or not. Anyway, this should be fixed. Dictionaries and arrays were planned, but not fully implemented. If (when) time allows, I will finish them. The syntax will then be dictionary[key] or array[index], e.g Panel014.Material.Material[Density] in the example from your thread.triplus wrote: ↑Tue Feb 13, 2018 3:39 pmHi Eivind.
I noticed one issue when helping an user to get a value out of dictionary into a spreadsheet cell:
https://forum.freecadweb.org/viewtopic. ... 76#p214826
If <<>> is used at the end it will get removed from the expression. Consequently after save and open operation resulting in #ERR.
Note the difference in persistence of <<>>. Any chance this could get fixed? Is there something else that is recommended to be done in such use case? Or are we just pushing the expressions limits to much?
Code: Select all