VB(A) still okay with 2005?

Discussion in 'AutoCAD' started by wivory, Apr 27, 2004.

  1. wivory

    wivory Guest

    I see a few posts with people using .NET in AutoCAD 2005. Can somebody please confirm whether the VB/VBA code I've written will still run under 2005?

    Thanks

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Apr 27, 2004
    #1
  2. wivory

    Kevin Terry Guest

    The vb and vba code you have will run fine on 2005 with few exceptions. If
    you find any, they should be classified as bugs.

    Kevin

    please confirm whether the VB/VBA code I've written will still run under
    2005?
     
    Kevin Terry, Apr 27, 2004
    #2
  3. Hi Wayne,

    I haven't had 2005 installed long enough to give a pedantic answer, but on a
    computer with Land Desktop 2004 and a new install of Land Desktop 2005, I
    simply loaded the R2004 menu and ran an extensive number of commands from a
    VBA program written for R2004 (and which includes calls to a number of VB6
    DLLs and the Flexgrid control). The library references for R2004 were
    recognised as such.

    I intend to try to run the program tomorrow on a computer with Land Desktop
    2005 only installed.

    I'll let you know what I find. I expect that it won't run till I change the
    library files.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au


    please confirm whether the VB/VBA code I've written will still run under
    2005?
     
    Laurie Comerford, Apr 27, 2004
    #3
  4. I had a complex routine that worked fine in 2004, but not in 2005. I had to
    export
    all the code and forms and reimport them into a clean dvb. There is an addin
    that comes
    with MS Office Developer that will do this enmass for you.

    Also, the TLB for 2005 overwrite the 2004 TLB's. My company is still on
    2004. I have
    2004 and 2005 installed. What happens is that when you open 2004 and modify
    a dvb,
    it silently upgrades it's references to say 2005. Then you give it to a user
    with only 2004
    and they are up the creek without a paddle. This is nasty! Autodesk might
    have thought
    this through a little better.

    I have a batch file and copies of the 2004 and 2005 tlbs in c:\program
    files\common\autodeskshared...
    The batch swaps them in and out depending on which version of Acad I need to
    run.

    - Ted
    WD Partners
     
    xxxTed Schaefer, Apr 27, 2004
    #4
  5. Been using it since late Nov and you shouldn't run into any problems.

    There is one exception - if you have a dual install [2004 & 2005] and you
    try and write an app for both. The 2005 libraries overwrite the 2004 ones,
    so anything written in this environment will NOT run on 2004-only unless
    you either use late-binding or open it in the 2004-only environment and
    re-reference the AutoCAD library.
     
    Mike Tuersley, Apr 27, 2004
    #5
  6. AutoCAD 2005 typelib is backward compatible with the AutoCAD 2004 typelib -
    which means that all the GUIDs for the interfaces/coclasses are identical.
    Any modifications/additions have been done via new Interfaces (with the new
    interface name ending with number "2").
    When a dvb file last saved in AutoCAD 2004 is opened in AutoCAD 2005 (or
    vice versa), we detect the change and reload the code from text. So any
    AutoCAD dvb file written in 2004 should work in 2005 (whether you use early
    binding or late binding). Same thing holds good for dvb files saved in 2005
    and opened in 2004 (provided of course that you did not use any of the new
    interfaces).

    Ted, from what I understand, you are writing code in Access VBA. Access VBA
    has no way of knowing this change between 2004/2005.
    So you have 2 options
    1. write code using late binding (i.e. do not reference the AutoCAD typelib
    in your code and declare all variables pointing to AutoCAD coclasses as
    "Object")
    2. convert your app from access vba to AutoCAD vba (i.e. save as a dvb
    file).

    Ravi
     
    Ravi Pothineni [Autodesk, Inc.], Apr 27, 2004
    #6
  7. Hi,

    Further to my previous post:

    I have now got Land R3, Land 2004, and Land 2005 with the test program for
    R3 and the test program for 2004 all installed on one computer.

    I've run my program with little sign of a hiccup except that the creation of
    plot data in layout space takes about 5 times longer than in 2004 on the
    same computer.

    I then ran the program again in Land 2004 without problems.

    Moved to a testing computer with Land Desktop 2005 and the program only.

    The program would not run until I swapped the two AECbase 4 to the AECbase
    4.5 files.
    I've yet to check the speed issue with the R2005 libraries.

    Then it ran and looked normal.

    --

    Regards


    Laurie Comerford
    www.cadapps.com.au
     
    Laurie Comerford, Apr 28, 2004
    #7
  8. Interesting Ravi... Using VB6, I had to revert to late binding so my
    experience tends to suggest your swapping ony occurs from within vba. Is
    this an accurate statement? Thanks for any light you might be able to shed.

    Mike
    ___________________________
    Mike Tuersley
    CADalyst's AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Apr 28, 2004
    #8
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.