Author Topic: VBA project references  (Read 4326 times)

0 Members and 1 Guest are viewing this topic.

NirantarVidyarthee

  • Guest
VBA project references
« on: April 26, 2013, 01:55:36 PM »
I have AutoCAD 2011 2012 & 2013 installed. All are needed for various reasons.

The problem is, when start a new project AutoCAD 2012 library is automatically referenced. Even if I try to remove it, AutoCAD does nor allow it saying that it is in use. I can't even find AutoCAD 2011 library in the list of references. And I want to reference 2011 library only.

Is uninstalling AutoCAD 2012 the only option?


David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: VBA project references
« Reply #1 on: May 01, 2013, 10:11:20 AM »
what if you start a project in 2011 autocad?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

CADDOG

  • Newt
  • Posts: 82
  • wishbonesr
Re: VBA project references
« Reply #2 on: July 23, 2013, 03:50:46 PM »
Is uninstalling AutoCAD 2012 the only option?

No and Yes.  Browse to the appropriate location for the acax17enu.tlb (2011) to add manually.

However, you will find ambiquity problems if your code if you have more than one referenced.
Creating version independance is possible, but you have to change most dim vars to objects, and use late binding instead with a get-or-create instance of acad (even though it's running the same vba code).