We have a VB application which was written with AutoCAD Map 2008 version.
We now need to re-write the entire application with AutoCAD Map 3D in VB.NET
Can anybody suggest some good specs/pointer?
And the way to do it...
It is very difficult to give much useful opinions/suggestions without knowing more details on what you have and you you want to do.
What kind of VB application do you have? is it an external EXE app, or it is VBA code running inside Acad, or it is VB ActiveX DLL project that is loaded into AutoCAD via VBA? What the application does?
When you want to rewrite it with VB.NET, are you going to do it as external EXE app? or if you want to make it DLL project, then do you want to use COM API, or .NET API (AutoCAD .NET API and/or Map .NET API)?
We have Vb 6 ActiveX dll applicatio which we want to convert to VB.NET 2008 DLL.
The application works with drawing files where we can add spaces to the floor of a building.
We can delete spaces as well.
When we want to convert to VB.NET 2008 DLL, we want to use .NET API (AutoCAD map 3D .NET API)
If you have .NET development experience, I am sure you know VB6 and VB.NET are very different other than their similar syntex. In most cases, there is no way to convert a VB6 project to a sound, workable VB.NET project.
Also, if you intend to use AutoCAD .NET API, then again, it is very different from AutoCAD COM API.
These two factors guarantees that whatever you have done in the VB6 project has to be rewritten with new API (AutoCAD .NET API) and new programming paradigm (.NET).
You can get started with AutoCAD .NET Programming labs, provided by Autodesk, or works on .NET code samples fond in ObjectARX SDK, or check this out:
You may also want to visit and post your question in Autodesk Discussion Group -> AutoCAD -> AutoCAD Customization -> .NET forum, in regarding of generic AutoCAD .NET issue (other than specific AutoCAD Map programming issue).
I have created SDF using a dwg file in AutoCAD Map 3D 2012.
But I am not able to open the SDF file as I don't have a tool to open it.
Could you please suggest a tool to open it so that I can view the features & the layers that are embedded into it?
Could you please tell me the link from where I can download such tool?
>> But I am not able to open the SDF file as I don't have a tool to open it.
You have Map3D, why don't you open the SDF with your Map3D then?
You can import it with _MAPIMPORT, you can reference it with _MAPCONNECT.
- alfred -
I am developing a project in VB.NET with AutoCAD Map 3D 2012.
I am opening a dwg file & want to know the layers that are present in the dwg file & then want to process those layers as per the requirement.
I tried to use AcMapMap.GetCurrentMap()
but it is failing, there is no such AcMapMap in AutoCAD Map 3D 2012.
Could you please tell me the way how should I know the name of the dwg file that I m opening & the layers that are present in the file?
what references have you set within your project? I have referenced these dll's
...to get this running:
Imports Autodesk.AutoCAD Imports Autodesk.Gis.Map Imports OSGeo.MapGuide Public Class cFdoTools <Autodesk.AutoCAD.Runtime.CommandMethod("myTools_g
etFdoLayers")> _ Public Shared Sub getFdoLayers() Dim tLoadedFdoLayer As String = "" Try Dim tCurrentMap As Platform.AcMapMap = Platform.AcMapMap.GetCurrentMap() If (tCurrentMap IsNot Nothing) AndAlso (tCurrentMap.GetLayers IsNot Nothing) Then Dim tLayerColl As MgLayerCollection = tCurrentMap.GetLayers If (tLayerColl IsNot Nothing) AndAlso (tLayerColl.Count > 0) Then For Each tLayer As MgLayerBase In tLayerColl tLoadedFdoLayer &= tLayer.Name & vbNewLine Next End If End If Call MsgBox("Loaded Fdo-Layers: " & vbNewLine & tLoadedFdoLayer) Catch ex As Exception Call MsgBox("<Your ErrMsg>") End Try End Sub End Class
HTH, - alfred -
You asked me to add a reference as
But I don't have any such dll present in the AutoCAD install folder as well as ARX folder.
Could you please where would I get these dlls?
I am using AutoCAD Map 3D 2012.
Here I get Map object as Autodesk.Gis.Map.
But I am not able to find Platform in Gis.Map
>> You asked me to add a reference as Autodesk.Map.Platform.dll
>> But I don't have any such dll
I have it in my installation-folder C:\Program Files\Autodesk\AutoCAD Civil 3D 2012 (you will have a Map-directory instead of my Civil one, but the file should be there.
- alfred -
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register