VB projects in AutoCAD 2002 & 2004

Discussion in 'AutoCAD' started by Emanuele, Jan 30, 2004.

  1. Emanuele

    Emanuele Guest

    I have some VB applications which draws on AutoCAD dwg.
    These projects have a reference to ACAD.TLB library, and I used the
    "getobject(, "AutoCAD.Application.15")" code to take the control of dwg.
    Now, with AutoCAD 2004 the code I should use is "getobject(,
    "AutoCAD.Application.16")", but the ACAD.TLB library is no more available
    and has been replaced with ACAX16ENU.TLB library. So, chancing the reference
    to the new .TLB library in my projects they correctly work in ACAD 2004.
    But the problem is that they don't keep on working in ACAD 2002.

    How can I do to make them work both in ACAD 2002 and ACAD 2004 versions?

    Thank you

    Emanuele
     
    Emanuele, Jan 30, 2004
    #1
  2. Emanuele

    Dave Guest

    I don't have the best answer for, because I believe you can do both at the same time with a conditional statement and I think that is what you a looking for, but I have mine built seperatly.

    --
    David Wishengrad
    President & CTO
    MillLister, Inc.
    Software for measuring and stretching multiple 3D solids.
    Http://Construction3D.com
     
    Dave, Jan 30, 2004
    #2
  3. Contrary to what Dave says, there's no conditional
    compilation, and if you use early binding, you cannot
    build a single project that will bind to either type
    library.

    You have two choices:

    1. late binding (and you will need to use the version-
    independent progid "AutoCAD.Application"), and not
    support multiple installed releases.

    2. Completely separate version-specific projects.
     
    Tony Tanzillo, Jan 30, 2004
    #3
  4. Emanuele

    SpeedCAD Guest

    :no:

    Is better to make two DLL for each version of AutoCAD ;)
     
    SpeedCAD, Jan 30, 2004
    #4
  5. Tony's right. What I do is first calling the ACAD's progID (which is
    universal for all ACAD applications installed on target computer) and then
    determine the version of running ACAD - if there's a need for some
    vertical's specific functions and dependancies.
     
    Maksim Sestic, Jan 31, 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.