4 Replies Latest reply on Aug 26, 2016 9:45 AM by Sanya Shmidt

    Equations Update Fail.

    Sanya Shmidt

      Hello guys!


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





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

               Dim Values() As String


                  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.