AnsweredAssumed Answered

Why value Evalauted by equation does not match with the sketch dimension value(Sketch dimension containing the same equation)?

Question asked by Deepak Kumar on Nov 6, 2020
Latest reply on Nov 6, 2020 by Deepak Kumar

I have a macro for adding equations to a sketch dimensions. Whenever i am running the macro equations are getting created as expected. sketch dimensions also have the same equations but the dimension value is not the same as evaluated by the equations. I am trying to rebuild it but that also does not work. When after running the macro i am manually changing the equation (by multiplying some number) then it gets updated correctly.

Here is the Code -


Dim evalStatus As Long
boolstatus = Part.Extension.SelectByID2("Equations", "EQNFOLDER", 0, 0, 0, False, 0, Nothing, 0)
Set swEquationMgr = Part.GetEquationMgr()
swEquationMgr.Add2 -1, Chr(34) & Instance5 & Chr(34) & Chr(34) & Chr(61) & Chr(34) & Inst4 & Chr(34) & " *1in", True
evalStatus = swEquationMgr.EvaluateAll