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

Discussion in 'SolidWorks' started by John, Oct 15, 2004.

  1. John

    John Guest

    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
     
    John, Oct 15, 2004
    #1
  2. 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
     
    Corey Scheich, Oct 15, 2004
    #2
  3. John

    P. Guest

    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.
     
    P., Oct 16, 2004
    #3
  4. John

    rocheey Guest

    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 :/
     
    rocheey, Oct 18, 2004
    #4
  5. 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
     
    Evan T. Basalik, Oct 21, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.