*Mark Gardiner
Message 11 of 11 (53 Views)

Re: AutoCAD 2006 reference in VB 2005

11-22-2005 04:44 PM in reply to: *Nate Hunter
Using GetObject(, "AutoCAD.Application.16") is a bad idea as if there are
multiple sessions of acad running you cannot garuntee that it will get the
acad you app is loaded in

in C# I use
Autodesk.AutoCAD.Interop.AcadApplication _AcadApp =
or VB
Dim _AcadApp Autodesk.AutoCAD.Interop.AcadApplication =

"Nate Hunter" wrote in message
I have found my solution!! Thanks for all your input. Here is what I did:

Public Class Form1
Dim MyAcad As Autodesk.AutoCAD.Interop.AcadApplication
Dim ThisDrawing As Autodesk.AutoCAD.Interop.AcadDocument

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
MyAcad = GetObject(, "AutoCAD.Application.16")
ThisDrawing = MyAcad.ActiveDocument
End Sub

End Class

I would still be interested in any books or documentation any one could
point me to for VB.Net & AutoCAD

"Nate Hunter" wrote in message
I would love to lean AutoCAD's .Net API. Is there any documentation out
there I could look at. I am a strong VB6 programmer that is trying to get
into the .Net side of things. All my programs are all designed around
AutoCAD & Access but the main focus is on AutoCAD. So if there is
documentation out there that could help me I would love to get my hands on

I currently only have VBA books for AutoCAD.

Thanks for all your help

wrote in message news:5019465@discussion.autodesk.com...
VB6 to VB.NET is not a seamless transition. For more info.

Also have you thought about learning AutoCAD's .NET API rather than
continuing to use ActiveX.

Regards - Nathan
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.