Problem: I've experienced part positions being incorrect when the spreadsheet parameters they depend upon are changed.
Using Assembly4 workbench, I inserted (using "Insert Link to a Part") 13 identical parts. Initially I set each to a different Z position using Property => Placement. Later, I attached the parts to a particular LCS, and in "Property => Assembly => Attachment Offset" gave each a different expression for its Z position e.g. <<Parameters>>.HeightOfLowestSlat + 7 * <<Parameters>>.SlatVerticalSpacing.
I found that the part positions did not update when the parameter "SlatVerticalSpacing" was changed. Selecting all the parts, editing "Property => Placement" and clicking OK fixed the positions temporarily but only until the parameter was changed again, or (I think) the file was reopened.
Looking in Document.xml (in the design file interpreted as a zip file) I found that the expression for AttachmentOffset in terms of the parameters was AFTER the expression for Placement which uses it, as follows:
Code: Select all
<Property name="ExpressionEngine" type="App::PropertyExpressionEngine" status="67108864"> <ExpressionEngine count="2"> <Expression path="Placement" expression="Bottom.Placement * Local_CS008.Placement * AttachmentOffset * Local_CS011.Placement ^ -1"/> <Expression path=".AttachmentOffset.Base.z" expression="<<Parameters>>.HeightOfLowestSlat + 0 * <<Parameters>>.SlatVerticalSpacing"/> </ExpressionEngine> </Property>
All useful advice welcome. Have I found a bug? Am I fighting the software? Is there a way to fix this problem from within the software? Is there a better way to do what I'm doing?
Part of my problem I think is that when using "Insert Link to a Part" to insert a part, the "X Translation" etc fields do not accept expressions (pressing "=" does nothing). If I could enter my parametric expressions there I think the order of expressions would then be correct.
NB: I wonder whether this is a similar problem: https://forum.freecadweb.org/viewtopic.php?f=20&t=68280
FreeCAD version: 0.19 (Branch_19.4).
OS: Windows 10.