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

Oct 15, 2004 4 Replies

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


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

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.

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 :/

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required