The process of importing contours from shapefiles is actually a two step process, since the results from Autodesk’s MAPIMPORT command does not elevate the resulting polylines. This is a step-by-step procedure on how to take a shapefile of contours to elevated polylines in AutoCAD (Map/Civil3D).

Shameless plug: Users of our MapWorks or C3DTools product can now simply use PolyContour > Shape Read.  Select the shapefile, choose the elevation field and you’re done.  Optionally layer imported polylines  using fields in the shapefile data or by an interval.

In AutoCAD Map (or Civil3D) begin in a new drawing.  If you know the coordinate system you are going to be working with, you can use the ADESETCRDSYS command to set it.  Since that’s somewhat optional we won’t go into any more details on that.  If you want to know more about ShapeFiles, click here.

Importing the flat contours (with object data):

  1. Issue the MAPIMPORT command.
  2. Navigate to the location of the ShapeFile (*.shp, *.dbf).
  3. Select the .SHP file and choose [OK].
  4. In the next dialog, follow steps 5 though 8 below.
  5. Check on “Import polygons as closed polylines” in the lower right
  6. In the grid in the center, click <None> under [Data].
  7. Set the radio button to “Create object data” and click [OK].
  8. Click [OK] again to continue.  You should see a number of objects  imported at the command area.
  9. Zoom Extents to see the contours.
  10. Save the drawing under a name on local drive C: like “C:\Temp\Source.dwg”.

If you have the PROPS dialog open, you will notice that if you click on a contour, the elevation is 0.00 but in the OD: section below that, you will see a field showing the proper elevation.  Take note of the field name as you will use it in the next process.

Elevating the contours (with attached object data):

  1. Begin a new empty drawing or open the project drawing that you are sure the contours would appear at the proper place in.
  2. Issue the ADEDRAWINGS command so we can attach your previously created Source.dwg.
  3. Click the [Attach] button.  You will notice that the only place you can look in (by default) is drive C: that’s why we had you save the file there.  You have to create aliases to other locations and that’s not covered here.
  4. Navigate to C:\Temp and select the Source.dwg, click [Add] then [OK].
  5. Click [OK] to close the Drawing Set dialog.
  6. Issue the ADEQUERY command.
  7. In the lower left click [Location], click {OK} for “all”.
  8. In the lower center check on Draw mode.
  9. In the lower right (Options) check on the toggle, then click [Alter Properties].
  10. In the center of the Property Alterations dialog, turn on Elevation.
  11. Click the [Expression] button, expand Object Data, expand the table name, and choose the field we asked you to note above. Click [OK] to close that dialog, you will see the expression in the field. Click [Add] to add it to the top of the list.
  12. Click [OK] to close the Property Alterations dialog.
  13. Click the [Execute Query] button to begin the process.  You should see the same number of objects  queried at the command area.

Now if you zoom extent you should see your elevated contours ready to continue.  While Map’s Drawing Attach & Query tools are very powerful, for common procedures there is a better way.

Comments are closed.

Post Navigation