AnsweredAssumed Answered

How to calculate string ("1+2") with API?

Question asked by Yong Ning on Jul 21, 2017
Latest reply on Sep 18, 2017 by Matthew Cempa

In API of Solidworks, with excel function. Calculate Str.

 

aaa.jpg

Private Sub del()

   Dim Str

      Str = "1 + 2"

   Dim Xls As Excel.Application

      Set Xls = GetObject(, "Excel.Application")

      Debug.Print Xls.Evaluate(Str)

      Stop

   Dim SwApp As SldWorks.SldWorks          

End Sub

 

Help me. How to calculate the string of arithmetic.

Outcomes