A common issue for designers is how to convert Civil 3D Pipe Networks into ESRI shapefiles (.SHP) or some other shapefile format for municipal design. Many municipalities maintain their storm and sanitary pipe networks as some form of GIS data format. This workflow will show you how to export these network items into the ubiquitous ESRI shapefiles as well as how to map the data within each pipe and structure to the shapefile’s dataset.
Starting from a file with a valid Civil 3D Pipe Network, we will first export the network as an Autodesk Spatial Data Format (.SDF). Ensure you begin from the standard Civil 3D Workspace. From the Export panel on the Output tab, click the Export Civil Objects to SDF.
When the Export to SDF dialog appears, make sure that you coordinate system is setup correctly. You will also need to ensure that the coordinate system is setup in your drawing in advance of the next step.
Start a new drawing in Civil 3D. Go into the drawing settings and make sure that the coordinate system is the same as the one exported from the SDF file. Change to the Workspace to Planning and Analysis. From the Insert tab, go to the Import panel and click Map Import.
Select the SDF file that was exported. From the Import window, we need to select the object types that we want to import, and we also need to manually map the pipe and structure data to their respective object types. Uncheck all options except for Pipes and Structures. In the data field, click inside the file to activate the lookup icon to open the Attribute Data window. From here, click the radio button next to Create object data and assign the respective object data. Once mapped, click OK to import the pipes as polylines and the structures as points.
When you zoom extents, you should be able to see the pipe network. Do not be confused if you do not see the structures themselves. These are imported as basic AutoCAD points, not COGO points; which are the size of a pixel by default. Click on one of the objects of each type and view its properties in the Properties panel. At the bottom, you will see that the Object Data is imbedded in the object.
While still in the Planning and Analysis Workspace, go to the Output tab. On the Map Data Transfer panel, click the DWG to SDF icon. In the Export Dialog, name the file “Pipes” and change the file output type to ESRI shapefile.
After clicking “OK”, the Export window appears with three tabs: Select, Data and options. For Pipes, the shapefile type is Line. If we have additional polylines in our drawing besides the pipes, we will also need to set the Layer to “Pipes”.
Go to the Data tab. This is where we map the object data back into a shapefile. Click the Select Attributes button and map the Pipe object data into the shapefile. Once done, click OK on both windows. If done correctly, you should see the total number of pipes that were successfully exported just above the command line.
Repeat the export process for the structures, except use and object type of Point. Lastly, using FDO, connect to the shapefiles themselves from the Map Workspace to ensure that all the data was mapped correctly.
About the AuthorFollow on Linkedin More Content by Randy McCollum