#include spreadsheet from another .FCStd file
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
#include spreadsheet from another .FCStd file
Is there any way to maintain some kind of single spreadsheet configuration for multiple files? Spreadsheets are great and flexible, but very difficult to use when multiple parts rely on single configuration -- every minor change in spreadsheet triggers a lot of computations, even if I'm working on single part and right now don't care about changes in other parts... lattice2 helped sometimes, but manual toggle of recomputes is another can of worms (and does not work in 0.18.1 anyway, complains about "18.1" being invalid literal for int).
Life sucks, then you die.
- Boneshaker
- Posts: 69
- Joined: Sat Feb 20, 2016 2:20 pm
- Location: Emden, Germany
Re: #include spreadsheet from another .FCStd file
Should be possible: https://www.freecadweb.org/wiki/Express ... nt_linking
Monthly FreeCAD Challenge: https://forum.freecadweb.org/viewtopic.php?f=24&t=36615
Re: #include spreadsheet from another .FCStd file
Awww, thanks! I wish there was description of this feature in Spreadsheet wiki page -- I remember searching for something like that, but I did not look for it in Expressions
Life sucks, then you die.
Re: #include spreadsheet from another .FCStd file
Someone should just tackle that <hint hint nudge nudge>
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: #include spreadsheet from another .FCStd file
Hi,
I think that
in the Spreadsheet wiki page is not very clear to indicate that possibility.For more specifics on how expressions are formed, see Expressions.
Maybe adding something like
What do you think ?For more specifics on how expressions are formed , such as Cross-document linking to include values from a spreadsheet from another document, see Expressions , section Cross-document linking.
(by the way, discovering that saved me soooo much time, thanks)
Find your user.cfg and system.cfg files : Macro_findConfigFiles
Imperial system makes no sense, go metric ! ! !
Imperial system makes no sense, go metric ! ! !
Re: #include spreadsheet from another .FCStd file
Guys, NO, absolutely not, you two are misunderstanding all this.....
It has nothing to do with "Spreadsheet" it only relates to "Expressions" and must only be documented there.
One point you are all missing is that this ability of Expressions to read from another document applies to ANYTHING that an Expression can read and not only Spreadsheets, but also any property of other things in the master FreeCAD document. Hence if you were to add a note to Spreadsheet in the wiki, you would also have to logically add the same note to almost every single piece of functionality in FreeCAD to the wiki, which of course doesn't make sense.
Second point, the original developer of Expressions said something like this ability to read from another document is just a hack, its useful so he left it there but at least at first, did not advertise it as its a limited hack that he was not sure was a good idea to encourage wide spread use of it.....or something along those lines. There has always been a long term plan to properly handle multi-document projects in FreeCAD.
Don't forget that you have to have the master document open in FreeCAD at the time you are entering the expression in the slave document, or if you want to recompute the slave.
Here is two example files, the "mastercube" file contains a Part Cube, the "slavefile" contains a Part Sphere which has its radius and X Placement values defined by the Length and Width properties of Cube in the "mastercube" file.
Jim
Re: #include spreadsheet from another .FCStd file
I updated the Expressions page in the wiki, so now the Expressions#Cross-document_linking section explains that this works with more than just Spreadsheet cell data.
Let me know, or edit yourselves, if you see any errors in my edit.
Jim
Let me know, or edit yourselves, if you see any errors in my edit.
Jim
Re: #include spreadsheet from another .FCStd file
Not on pc now but does recompute of slave show a warning or an error if master is not open? Maybe it could suggest to open the referenced document if it is not already open?
Re: #include spreadsheet from another .FCStd file
Yeap, it does
Exception (Sun Jul 7 20:51:09 2019): Document not found: mastercube
There is a lot of things that it could, should or will one day do, but its current state is simply as far as the code has got, at this time. It needs someone to write the code but before that a decision on what it will do and how. We have previous talked about multi-documents in connection with assemblies, way back when we were working on the original Assembly WB.
Re: #include spreadsheet from another .FCStd file
I was missing that point, thanks. So yes it makes sense not to add it everywhere.
So injmaustpc wrote: ↑Sun Jul 07, 2019 6:24 am I updated the Expressions page in the wiki, so now the Expressions#Cross-document_linking section explains that this works with more than just Spreadsheet cell data.
you could add the example you gave in your message :For example, a cell in a spreadsheet or the Length of a Part Cube, etc. in one document can be defined by an Expression that references the X Placement value or another Property of an object contained in a different document.
Code: Select all
mastercube#Cube.Length
Find your user.cfg and system.cfg files : Macro_findConfigFiles
Imperial system makes no sense, go metric ! ! !
Imperial system makes no sense, go metric ! ! !