Preview | SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
DGDeepak Gupta16/03/2015
I'm using following codes to connect to running session of SOLIDWORKS. But since I've multiple SOLIDWORKS version installed on the machine, the codes always try to connect to the latest version by opening it rather than connecting to current active version.
For example I've SW 2014 and 2015 installed and these codes will always connect to 2015 even if 2014 is running. Can anyone look at the codes and suggest where I'm making the mistake. I'm using Visual Studio Express 2013 if that makes any difference.
Module Module1
Sub Main()
Dim swApp As Object = GetObject ("", "SldWorks.Application")
If swApp IsNot Nothing Then
swApp.Visible = True
swApp.SendMsgToUser("Hello!")
End If
End Sub
End Module