get or create solidworks object

Hi all,

I have SolidWorks 2011 and 2013 version installed.

I have some macros that uses GetObject to get solidworks object. These macros work fine where these is only one SolidWorks version. But on my computer, these macros run only on letest SolidWorks version, i.e. SolidWorks 2013. If i modify macro and use CreateObject instead of GetObject, this start new SolidWorks session, one SolidWorks session is alreaady running. this situation happens only when there are 2 SolidWorks version in same computer. I am bit confused with GetObject and CreateObject, please help how to tackle with this.

My intention is that, current SolidWorks instance should get followed, whether it is 2011 or 2013.

Thanks in advance.

Krishnakant Patil.

SolidworksApi macros