.NET

Reply
*Mark Gardiner
Post 11 of 11

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 =
(AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplic
ation;
or VB
Dim _AcadApp Autodesk.AutoCAD.Interop.AcadApplication =
Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;


Mark
"Nate Hunter" wrote in message
news:5020349@discussion.autodesk.com...
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
MsgBox(ThisDrawing.Name)
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
news:5019916@discussion.autodesk.com...
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
it.

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.
http://msdn.microsoft.com/vbrun/staythepath/additionalresources/upgradingvb6/

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