style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Andrea1" <Hello
href="mailto:adeflora@pateeng.com">adeflora@pateeng.com> wrote in
message
href="news:f0c4b8a.-1@WebX.maYIadrTaRb">news:f0c4b8a.-1@WebX.maYIadrTaRb...
All,
I'm kind of new to VBA with AutoCAD programming...
What I'm trying to
do seems easy enough - obtain info about the current active project in
land-desktop. I have a form with a button that just flashes the name of the
active project. When I execute this code, it fails on line 4 saying that the
class factory can't supply the requested class. I am referencing the following
libraries:
VBA, AutoCAD 2000 Type Library, OLE Automation, Microsoft Forms
2.0 Object Library, AEC Base 3.0 Application Library, AEC Base 3.3 Object
Library, Autodesk Land 1.2 Type Library
1 Private Sub CommandButton1_Click()
2 ' This example returns the name of the ActivProject.
3 Dim
activeProj As AeccProject
4 Set activeProj =
AeccApplication.ActiveProject
5 MsgBox "The ActiveProject is: " & activeProj.Name, _
6 vbInformation, "ActiveProject Example"
7 End Sub
I guess what I need to know is how to use Aecc objects from the VBA editor
in land desktop. When I use the
ThisDrawing.Application.GetInterfaceObject("Aecc.Application") method of
obtaining AeccApplication, I get an error saying it can't load the
application. These are being launched from a macro within the open ldd, so I
can't figure out what's wrong.
Any help would be appreciated!
Andrea