We use several macros that previously populated global variables in the equation manager, recently our VAR asked us to create Custom properties that will be the entry point for the variables. we did this and set the global variables to link to the custom properties. Now out macros crash, I've narrowed the problem down to the ForcerebuildAll line. It seems that after we update the custom properties the equation manager is not re-evaluating the new variables. so I tried to add the code below before the force rebuild. This did not work it runs without error but one of the variables controls the suppression state of a component and it does not update that equation and resolve that component. then when it gets to the forcerebuildall it crashes with a access violation error. Does anyone know of another method to refresh all equations after updating the custom properties? This only seems to be a problem when unsuppressing components any other changes everything works smoothly.
swModel.GetEquationMgr
Dim evalStatus As Long
Set swModel = swApp.ActiveDoc
swModel.SaveSilent
evalStatus = MyEqu.EvaluateAll
SolidworksApi/macros