Hello guys!

Looking for some help here. I`m having problems updating the Equations values via API. Below is what i have written:

PushValue("FRAMEWIDTH",3)

Private Function PushValue(ByVal var As String, ByVal ind As Integer) As Boolean

Dim Values() As String

Try

Dim swEqnMgr = swPart.GetEquationMgr : Values = ImportData.GetValues(var)

swEqnMgr.Equation(ind) = "" & var & "=" & Values(0) '** What would be the proper way of re-writing it? so It pushes "FRAMEWIDTH" vs FRAMEWIDTH**

Catch ex As Exception

Return False

End Try

Return True

End Function

So what it does it`s replaces the Equation FRAMEWIDTH without brackets. So if you look in the equations folder all Variables have "brackets".

That causes Solidworks to spit out the message

And then it just deletes it from equations folder. So all of the formulas I have - based on this Variable are screwed.

Thank you.

Any help appreciated.

swEqnMgr.Equation(ind) = """" & var & """=" & Values(0)