Tuesday, March 1, 2011

Importing ESRI shape file into Civil 3D shows zero elevations


When user imported ESRI shape file into Civil 3D, the file inserts fine and all objects have X and Y values, but the elevations are all zero.


You cannot import Z values contained in an ESRI shape file directly. However, you can create a DWG file from the ESRI shape file that does contain the correct Z values. Follow these steps for workaround:
  1. Open a new work session in AutoCAD Civil 3D using the Tool-based Geospatial workspace.
  2. In command line type MAPIMPORT.
  3. In the Import Location dialog box, select ESRI Shape from the Import Type drop-down menu and browse to the folder where the shape file you want to import is located. Click OK. Note: If you want to import portion of the data, or know the area you want to cover, set Spatial Filter to current display or Define Window, otherwise choose None
  4. In the Import window, click in the Data field […].
  5. In the Attribute Data dialog box, select Create Object Data and click on Select Fields
  6. In the Object Data Mapping, select the fields that you want written to the object data table (i.e. Elevation).
  7. Click OK to close all dialog boxes and import the file.
  8. After the shape file has been imported, save and close the drawing.
  9. Open a new work session.
  10. To attach the drawing you just saved, from Home ribbon of Geospatial Workspace click Attach and then browse to the drawing you want to attach.
Note: Make sure you have set up a drive alias to access the drive where the drawing is saved.
To define a new query:
  1. On the Home ribbon, click on Define Query button. 
  2. In the Define Query dialog box, click Location.
  3. In the Location Condition dialog box, select All, and then click OK.
  4. In the Define Query dialog box, click the Alter Properties button.
  5. In the Set Property Alterations dialog box, click Elevation and then click the Expression button. 
  6. In the Select Data dialog box, verify that the Object Data option is selected, and then select the object data field that you want to use as your elevation data. Click OK.
  7. In the Set Property Alterations dialog box, click Add, and then click OK. 
  8. In the Define Query dialog box, verify that the Draw option is selected, and then click Execute Query.
  9. Zoom>extent
  10. You can verify the elevation values by looking at an object's properties..
  11. Save the drawing.

No comments:

Post a Comment