Convert Civil 3D Data to SHP Files
As a certified Autodesk® instructor and a manager within the civil engineering industry, I have been asked many times about using AutoCAD® Civil 3D®-created data within ESRI ArcGIS. This article describes the required steps to bring Civil 3D data into ArcGIS for Desktop. The process will extract the line work and data from the Civil 3D drawing (DWG file) and create a Shape file (SHP file) that is compatible with ArcGIS. The created ArcGIS file can then be imported into ArcGIS for Desktop. The goal is to create data that can be visualized and analyzed in ArcGIS while maintaining the design information in Civil 3D and maintaining a simple and efficient workflow.
One of many solutions I have read about was to explode the Civil 3D objects and then import the line work into the GIS software. The problem with this is that all the data created by Civil 3D’s designers is then lost. All of this would then have to be recreated by the person’s using the GIS software. This doesn’t fall within my idea of keeping everything as simple as possible.
The following conversion technique has been tried on different versions of AutoCAD, from 2008 through 2012, but my suggestion is to export and import using the same version as you would ultimately be using. The first portion of the import will create 2D line work which can then be used for import into a CAD or GIS program. The line work created in the steps below will also maintain the data associated with it. It is at this point you will create SHP files with this data for export and then import into the GIS database.
Following the steps below will allow all data created by the designer to be incorporated into the GIS program. This will also mean that you will not have to explode the Civil 3D design. This will be very important to the design team and maintain the database as designed. Please note that this should be performed at a late stage in the design process. This will then give the client a very useful tool for existing and future design and maintenance of their facilities.
Article collaborator, Justin Comeau, and I created the steps listed below for export from Civil 3D and import into ArcGIS for Desktop.
1) Export Civil 3D data to SDF format (I will use 2012).
a) “AeccExportToSDF” (Civil 3D only) is the command or “Output” from the Civil 3D toolbar, then “Export Civil Objects to SDF” in the “Export” box (this may very per Civil 3D versions).
Or “MapExport” is the command or “Map” then “Tools” then “Export” in Map 2008 menu.
b) Make sure you have the correct coordinate system setup in your drawing or you will be prompted to select one.
c) A file will be created with a count of items at the command prompt and with the same name as the drawing and the extension “XXXXXX.SDF” and placed in the same directory as the drawing.
2) Now open a new drawing (I will use 2012).
3) Now import a SDF format file:
a) Change workspace to “Planning and Analysis” (this may vary per Civil 3D versions or setup).
b) Select to “Insert” on the toolbar.
c) Select “Map Import” in the Import Box (this may take a few minutes).
d) Select the file you created in step 1 above.
e) This will open the box shown at the right.
f) Select the “Coordinate System.”
g) Select the items you would like to import (i.e., Pipes, Structures).
h) Then select the inside the “Data” box and “Radio” button will display
i) Select the “Radio” button to get the “Attribute Data.” You will get an “Attribute Data” window.
j) Select “Create object data.” This is very important step as this will import the data information which will be required for the “SHP” files later).
k) Select OK.
l) Select OK. This will import the data as lines and points with Civil 3D data included (you may have to do a zoom extents, and also set “PDMODE” to “2” to see the point data).
m) Save your drawing to a new name (and maybe version).
Now open the drawing you just saved, I will use 2012. For this step, use 2008, 2011, 2012, or 2013 but do not use 2010 as this will not give you all the options you will need.
4) Export a “SHP” file (now you will need to create a shape file for each type of data you have, i.e., “Pipes” (line data), “Structures” (point data), etc.)
a) Change your workspace to “Planning and Analysis” (this may vary per Civil 3D versions or setup).
b) Select “Output” from the ribbon.
c) Select “Map 3D Export” from the “Map Data Transfer” box (this may take a few minutes to open). See Figure 4.
d) Make sure the file type is set to “ESRI Shapefile (*.shp).”
e) Select OK (this may take a few minutes to open the next window).
f) When the export window opens, you will need to select the type of data you will need for the shape file (i.e., “Point”, “Line”, “Polygon”, or “Text”). Note: this is the option you do not get in Civil 3D 2010.
g) Select “line” object type.
h) Select the “Data” tab at the top this will bring you to the attributes window.
i) Select the “Select Attributes,” which will bring up the attribute dialog box and you will need to expand the “Object Data” so you can select the type of shape file you are creating.
j) Select “Pipes” (which matches “Lines” selected in step 5g) for our example.
k) Select OK.
l) This will now populate the fields “Source Field” and “Output Field.”
m) Select OK.
n) This will now create the required SHP file with the required data for input into ESRI software (note this will provide a count of the objects produced on the command line).
5) Repeat steps 5a through 5m to create additional SHP files as required.
The reason for the exercise is to get the following information into ArcGIS for Desktop without exploding or damaging the Civil 3D drawing. As you can see in Figure 8, all the design data is maintained in the SHP files for use in ArcGIS.This way as the project moves forward we can still use the Civil 3D files. We will have to recreate the SHP as items change in Civil 3D. See below for the final result in ArcGIS.
You may need to export and import in the same version of Civil 3D or Map.
Follow the steps above to import data into ArcGIS for Desktop (SHP file) and maintain the AutoCAD Civil 3D line work and data (DWG file). This makes a simple workflow from the design to the visualization and analyzing of the data within ArcGIS for Desktop. With this we can then produce required exhibits/maps for the client with ArcGIS for Desktop.