AnsweredAssumed Answered

Attaching to running SolidWorks Session?

Question asked by Brian Titus on Oct 17, 2014
Latest reply on Oct 30, 2014 by Edgar Quintana

Programming with VBA for a long time I've used the following to either attach/start a SolidWorks session:


          sw = GetObject(, "SldWorks.Application")


With Visual Studio 2010, I am using the following command:


          sw = New SldWorks()


In both of these cases, this is SUPPOSED to attach to an existing SolidWorks session IF one is already running.  ON some machines this works as expected, but in many cases it does not find the running session and fires up a NEW SolidWorks.  This results in two (2) sessions running.


Any ideas on how to prevent/fix this?

I found some vague references on MSDN about how it might not be registered in the Running Object Table (ROT)?


Repair/Re-install of SolidWorks do not help.