I'm a newbie in programming VB, but i made before some vbscripts (mainly coping&pasting&editing some examples i found on web). Now i want make a little stand-alone app with VB (VisualStudio2010) that can convert DXF to DWG (plus extras, like zoomextens, set insert units to meter, setbylayer, purgeall). So i started with a form and a simple button that can launch Autocad 2011 x64.
This is the (very) first point: i can't start Acad.
My configuration:
- Windows 7 64 bit
- Autodesk Civil 3D x64
- Microsoft VisualStudio 2010
- ObjectARX 2011 (downloaded and extracted on c:\)
This is what i made:
- New project - Framework 4.0 (i tried the 3.5 without success).
I added the following references:
- In c:/ObjectARX 2011/ObjectARX 2011/inc-x647: Autodesk.AutoCAD.Interop.Common.dll and Autodesk.AutoCAD.Interop.dll
Code:
Imports System
Imports System.IO
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oAcadApp As Autodesk.AutoCAD.Interop.AcadApplication
oAcadApp = CreateObject("AutoCAD.Application")
oAcadApp.Visible = True
End Sub
End Class
I receive these errors (sorry, my VS2010 is in italian):
Code:
"Impossible to create the ActiveX component"
"Eccezione first-chance di tipo 'System.Runtime.InteropServices.COMException' in mscorlib.dll
Eccezione first-chance di tipo 'System.Exception' in Microsoft.VisualBasic.dll"
In Window's Task manager i can see the acad.exe process running, but not the software window.
Please help me start my journey!