color=#0000ff>Dim doc
color=#0000ff>As
Autodesk.AutoCAD.Interop.AcadDocument
app = GetObject(,
color=#a31515>
color=#a31515>"AutoCAD.Application.17"
face=Arial>)
doc = app.ActiveDocument
but if I change
Dim app As Autodesk.AutoCAD.Interop.AcadApplication
I get thisdrawing control but
recieve error on app. this is the only line in 1000 lines that shows as an
error
John
Coon
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Mep09Developer> wrote in messageHello,
href="news:6157471@discussion.autodesk.com">news:6157471@discussion.autodesk.com...
I am in the same situation you are with .NET programming. About all we can do
is dive right in. Your references appear to be correct for the ActiveX/COM
API. Next, you do this: Dim app As Autodesk.AutoCAD.Interop.AcadApplication
Dim doc As Autodesk.AutoCAD.Interop.AcadDocument ' I am getting the AutoCAD
2009 application with this number 17. Your number may vary. app = GetObject(,
"AutoCAD.Application.17") doc = app.ActiveDocument The variable 'doc' is now
the equivalent of ThisDrawing in VBA. Hope that
helps!
color=#0000ff>Dim doc
color=#0000ff>As
Autodesk.AutoCAD.Interop.AcadDocument
app = GetObject(,
color=#a31515>
color=#a31515>"AutoCAD.Application.17"
face=Arial>)
doc = app.ActiveDocument
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"john coon" <
href="mailto:jcoon@hta-nh.com">jcoon@hta-nh.com> wrote in message
href="news:6157540@discussion.autodesk.com">news:6157540@discussion.autodesk.com...
Thanks for the help.
When I insert your sample I still
get error on thisdrawing
color=#0000ff>dim app
color=#0000ff>As
Autodesk.AutoCAD.Interop.AcadApplication
color=#0000ff>Dim doc
color=#0000ff>As
Autodesk.AutoCAD.Interop.AcadDocument
app = GetObject(,
color=#a31515>
color=#a31515>"AutoCAD.Application.17"
face=Arial>)
doc = app.ActiveDocument
but if I change
color=#0000ff>
Dim app As Autodesk.AutoCAD.Interop.AcadApplication
size=2>
Dim ThisDrawing As
Autodesk.AutoCAD.Interop.AcadDocument
app = GetObject(,
"AutoCAD.Application.17")
ThisDrawing =
app.ActiveDocument
I get thisdrawing control but
recieve error on app. this is the only line in 1000 lines that shows as an
error
John
Coon
face=Arial size=2>
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<Mep09Developer> wrote in messageHello,
href="news:6157471@discussion.autodesk.com">news:6157471@discussion.autodesk.com...
I am in the same situation you are with .NET programming. About all we can
do is dive right in. Your references appear to be correct for the
ActiveX/COM API. Next, you do this: Dim app As
Autodesk.AutoCAD.Interop.AcadApplication Dim doc As
Autodesk.AutoCAD.Interop.AcadDocument ' I am getting the AutoCAD 2009
application with this number 17. Your number may vary. app = GetObject(,
"AutoCAD.Application.17") doc = app.ActiveDocument The variable 'doc' is now
the equivalent of ThisDrawing in VBA. Hope that
helps!