style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
g.com> wrote in
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
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.
activeProj As AeccProject
4 Set activeProj =
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
pplication") 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!
Access a broad range of knowledge to help get the most out of your products and services.