SW upgrade = rebuild for all VB Apps - surely, I'm missing something

Hi,

I am an experienced VB Developer and have been writing software against APIs & COM Object Models 10 years. However, I am a novice with SolidWorks API and even SolidWorks from a user perspective.

My problem is, every time my client does a SolidWorks upgrade, the applications I wrote lose references to the SW COM object model. This appears to me to be SW changing the interface GUIDs for every release, which can't be right or everybodys apps would be breaking.

Should I be using a special reference or something? Perhaps a version specific call such as : Set m_oSolidWorksApp = New SldWorks.SldWorks2004

Thanks in advance for any help.

Regards, John

Reply to
John
Loading thread data ...

I have always used Set m_oSolidWorksApp = Applicationl.Sldworks with no problems between versions

if you want to connect version specific Set m_oSolidWorksApp = createobject ("SldWorks.Application.12") 'for 2004

though it may be ("SolidWorks.Application.12")

Corey

Reply to
Corey Scheich

Seems to jog my memory that there is something posted on the SW website under the API examples on how to connect to any version.

Reply to
P.

I use all early binding, and usually have to reference with each

*major* release.

However, if you want to remove the early binding, and change all your swx-specific objects to generic objects, the code will run slower but last longer :/

Reply to
rocheey

When using VB6, I have found that you can definitely make your code infinitely version portable by using laste binding (GetObject). However, in .NET, the fact that you need to use interops, removes that ability. I miss it!!

However, I have successfully made it work by just having a copy of the old library on my machine and creating the interop from that.

Evan

Reply to
Evan T. Basalik

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.