AnsweredAssumed Answered

Linking to Solidworks API

Question asked by Hunter Toth on Mar 9, 2018
Latest reply on Mar 12, 2018 by Artem Taturevych



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