3 Replies Latest reply on Mar 12, 2018 7:35 AM by Artem Taturevych

    Linking to Solidworks API

    Hunter Toth

      Hello,

       

      I build macros for automation purposes on my company with VB in Visual Studio. I'm running into some problems after we upgraded to 2018. If a computer has both 2017 and 2018 installed, "swApp = New SldWorks.SldWorks()" wont work for both. So, I could use "swApp = CreateObject("SldWorks.Application.26")" to force 2018 and a try/catch to choose 2017 if 2018 is not running. The problem with this is sometimes it hangs and takes a good 15 seconds to move on. What is the most efficient way to develop macros for multiple versions of Solidworks and multiple versions on one computer?

       

      Any help is appreciated! thanks