TheSwamp

Code Red => VB(A) => Topic started by: NirantarVidyarthee on April 26, 2013, 01:55:36 PM

Title: VBA project references
Post by: NirantarVidyarthee 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?

Title: Re: VBA project references
Post by: David Hall on May 01, 2013, 10:11:20 AM
what if you start a project in 2011 autocad?
Title: Re: VBA project references
Post by: CADDOG 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).