Sometimes we want to import GIS data into Civil 3D. This blog post will cover how to import the data using an FDO connection. FDO connections are great because they keep a dynamic link between the drawing and the data. So when the data shape files change the changes should be reflected in Civil 3D.
To start you will want to change the workspace to be Planning and Analysis. You can do this in the bottom right hand of the program using the settings cog and choosing Planning and Analysis.
More then likely you won’t have the Map Workspace open. To turn it on type MWSPACE at the command line and set the value to ON.
Next make sure the tab selected on the Task Pane is set to Display Manager and then click the cylindrical shape and choose Connect to Data…
This will bring up the Data Connect Palette. The Palette contains many different connection types. If you want to use a different data type go ahead, the steps will be similar. Now find the Add SHP Connection line item. Provide a Connection Name that makes sense. For this example I’ll be working with a sanitary sewer data set, so I’ll call it SHP_LosAngelesSewer and set my Source file or folder.
You can either select a folder of shape files or a single shape file. For this example I selected a single one. Next press the Connect Button. The schema will then be read from the file and the information shown. Now press the Add to Map drop button or use the drop down list to add data with a query. Using the Add to Map option will bring all of the data into the drawing. Using the query will provide a way to limit the data to bring in.
Using the query dialog box you can build a query. The one I use most often is the Locate on Map. This way I don’t have to import the entire County of Los Angeles Sewer data, but just a portion around the project I’m working on. To create the query use the drop down and select the how you want Map to determine which data to bring in. In this example I’m going to use an Inside Rectangle.
Once you do that you will be prompted to select the area you want with a rectangular selection. Then it will come back to the Create Query dialog box with the query filled in.
You can add other queries, but I’ll skip that for this post. Also now that you can import the data multiple times from one data source. Once the queries are done the data from the shape files should be shown in the drawing.
Having the information is great, but we probably want to distinguish between the different sizes or some other criteria. To do this we press the Style button on the Display Manger tab of the Task Pane. This will bring up the Style Editor. Currently the information is set to be a default value. For simplicity I’m going to create an Automated theme by pressing the New Theme… button. This will bring up the Theme Layer dialog box.
I’m then going to change the Property that I want the theme to be created from to Diameter. The dialog box will then show the range of values. Then select the distribution type, I’m using Equal and the number of rules you want created. This will determine how they themes will be applied. You can always modify them if you don’t like how they are created.
Lastly we will want to create labels. To do this check the Create Feature Labels check box. Then press the button with the three dots. This will bring up the Style and Label Editor. Press the button next to Text field to get the Create/Modify Expression.
Then using the Text Function Concat, build how you want the label to be shown. For this example I’m using the Diameter, inch symbol and the material. Note that a single apostrophe at the beginning and end of the string value is what is used to denote text.
Make any other changes to the colors or fonts you wish to make. Here is what my label looks like.
Then exit back through the dialog boxes and you should then see your map with themes.
You can control the thems from the Display Manger, turning the information on and off using the check marks. There is lots of other things you can do with the data, but this is the starting point in bringing it in.
7 comments:
Great post, my biggest problem is finding the information to download. Is there a list anywhere with links to the different state resources? Where did you get the data set you used in this example?
Not that I know of. Your best bet would be to call the County and see if they have any public information available. It varies greatly. For instance Los Angeles County provides a wealth of information for free or a low cost. Where the next county over, Orange, charges an arm and leg to get the data.
This is great !
Can i connect/import SHP file using FDO, and make a query not to import th Z-value.
only import as 2D ??
Because when i save the mapdata as Autocad, it gets exploded with lot of polylines.
I think it is because of the Z-value.
I don't think so. You'd have to import and then use these steps to change the z value.
https://map3d.wordpress.com/2007/09/26/contours-from-shape-files-with-elevations/
Okay, but is it possible to style the imported SHP-file with blocks like when you are using FDO connection? fx I want to import a area with manhole-cover with circle block.
When normally importing the SHP file, without FDO connection i only get points.
I like to use FDO connect, but the problem is I can't xref with other drawings and i have save each layer to reinsert with the same style in other drawing. When saving as Autocad format it explodes the drawings and get messy because of the z-values.
Then use MapImport instead. This will bring in the linework as AutoCAD objects. Then turn the points into Civil 3D Points and then assign the correct style to them.
Thank you, Problem solved !
Post a Comment