3 Replies Latest reply on Aug 8, 2014 12:44 PM by Ashok Anumula

    Acess Solidworks through Excel VBA

    Ashok Anumula

      Solidworks 2014, SP 4.0,64bit

      Excel 2010 64bit

       

      Returns null when I try to get the path of the macro folder from solidworks.

       

      My Code

      Private Function GetDBPath() As String

         

      'Gets the JobDataBase path based on solidworks application.

       

          Dim SwApp As SldWorks.SldWorks

         

          Set SwApp = CreateObject("Sldworks.Application.22")

          'Set SwApp = Application.SldWorks

         

          GetDBPath = SwApp.GetCurrentMacroPathFolder()

         

         

      End Function

       

      References, Solidworks 2014 Type Library is added

       

      I tried this in above code and returns english

      ? swapp.GetCurrentLanguage()

       

      Any thoughts would be greatly appreciated.