n8wex
2009-08-29, 01:38 PM
Hi, I'm having trouble loading any vb.net app that I create. I always get the same attached error message / details!!!
I have success with AutoCAD project wizard however this is in XAML and I need a windows app.
http://through-the-interface.typepad.com/through_the_interface/2009/06/a-new-project-wizard-for-autocad-net-development.html
The samples in C:\ObjectARX 2010 work fine.
It create HelloWorld class app I do the following. What am I missing? Please help. Thanks.
1. Create new vs2008 class project
2. Add AcDbMgd.dll & AcMgd.dll from C:\ObjectARX 2010\inc-win32
3. Set the project debug to C:\Program Files\AutoCAD MEP 2010\acad.exe
4. Start the App
Imports System
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput
<Assembly: ExtensionApplication(GetType(HelloWorld.HelloWorldApp))>
<Assembly: CommandClass(GetType(HelloWorld.HelloWorldCommands))>
Namespace HelloWorld
Public Class HelloWorldApp
Implements Autodesk.AutoCAD.Runtime.IExtensionApplication
Public Sub Initialize() Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize
End Sub
Public Sub Terminate() Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Terminate
End Sub
End Class
Public Class HelloWorldCommands
<Autodesk.AutoCAD.Runtime.CommandMethod("HELLO")> _
Public Sub HelloCommand()
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(vbNewLine + "Hello World!" + vbNewLine)
End Sub
End Class
End Namespace
I have success with AutoCAD project wizard however this is in XAML and I need a windows app.
http://through-the-interface.typepad.com/through_the_interface/2009/06/a-new-project-wizard-for-autocad-net-development.html
The samples in C:\ObjectARX 2010 work fine.
It create HelloWorld class app I do the following. What am I missing? Please help. Thanks.
1. Create new vs2008 class project
2. Add AcDbMgd.dll & AcMgd.dll from C:\ObjectARX 2010\inc-win32
3. Set the project debug to C:\Program Files\AutoCAD MEP 2010\acad.exe
4. Start the App
Imports System
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput
<Assembly: ExtensionApplication(GetType(HelloWorld.HelloWorldApp))>
<Assembly: CommandClass(GetType(HelloWorld.HelloWorldCommands))>
Namespace HelloWorld
Public Class HelloWorldApp
Implements Autodesk.AutoCAD.Runtime.IExtensionApplication
Public Sub Initialize() Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize
End Sub
Public Sub Terminate() Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Terminate
End Sub
End Class
Public Class HelloWorldCommands
<Autodesk.AutoCAD.Runtime.CommandMethod("HELLO")> _
Public Sub HelloCommand()
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(vbNewLine + "Hello World!" + vbNewLine)
End Sub
End Class
End Namespace