Sei sulla pagina 1di 6

0 AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/) CIVIL DESIGN & SURVEYING(HTTP://WWW.

THECA
acebook.com/sharer.php?
masters.com%2F2011%2F03%2F16%2Fassign-
urs-from-an-esri-shape- le%2F)
0 (http://www.thecadmasters.com)
itter.com/intent/tweet?
url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
-an-esri-shape- le%2F&via=CADMasters)
AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/) CIVIL DESIGN & SURVEYING(HTTP://WWW.THECADMAS
0
us.google.com/share?
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
est.com/pin/create/link/?
0
/2011/03/16/assign-elevations-to-contours-from-
CIVIL 3D (HTTP://WWW.THECADMASTERS.COM/CATEGORY/CIV-DESIGN/CIVIL-3D/), GIS
n-esri-shape-
evations+to+Contours+from+an+ESRI+Shape+File)
(HTTP://WWW.THECADMASTERS.COM/CATEGORY/GIS/), MAP 3D (HTTP://WWW.THECADMASTERS.COM/CATEGORY/GIS/MAP-3D/), MAP
0
.linkedin.com/cws/share?
3D ENTERPRISE (HTTP://WWW.THECADMASTERS.COM/CATEGORY/GIS/TOPOBASE/)
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)

Assign Elevations to Contours from an ESRI Shape


2
masters.com/2011/03/16/assign-
ours-from-an-esri-shape- le/)

File
(http://www.thecadmasters.com/2011/03/16/assig
n-elevations-to-contours-from-an-esri-shape-
le/)
MARCH 16, 2011 by NEIL BONDY (HTTP://WWW.THECADMASTERS.COM/AUTHOR/NEIL/)

Shape les (.shp) are a common le format in the GIS world, the le format is often used to exchange
data between ESRI software and AutoCAD.  Because each software package structures data
di erently, translating it into something useful can be challenging.  For example, shape le vectors are
always 2D.  Though if they are contours, they should have an attribute that represents their elevation. 
In this post, I’ll go through importing an ESRI shape le containing contours, and moving those
contours up to the appropriate elevation.

AutoCAD Map, Civil 3D, Land Desktop, and Topobase all have the ability to import a shape le.  You’ll
need the .shp, .shx, and .dbf les in order to import and perform the translation.

Part A – Import  the Shape File:

1. Start a new drawing.

2. Type MAPIMPORT at the command line.

3. Make sure Files of type is set to ESRI Shape le, select the le, and click Open.

4. In the Import dialog, select Import polygons as closed polylines.


5. Click inside the cell under Data:
0 AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/) CIVIL DESIGN & SURVEYING(HTTP://WWW.THECA
acebook.com/sharer.php?
masters.com%2F2011%2F03%2F16%2Fassign-
urs-from-an-esri-shape- le%2F)
0
itter.com/intent/tweet?
url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
-an-esri-shape- le%2F&via=CADMasters)
0
us.google.com/share?
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
est.com/pin/create/link/?
0
/2011/03/16/assign-elevations-to-contours-from-
n-esri-shape-
evations+to+Contours+from+an+ESRI+Shape+File)
0
.linkedin.com/cws/share?
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
(http://www.thecadmasters.com/wp-content/uploads/2011/03/20110309-MapImport.jpg)
2
masters.com/2011/03/16/assign-
6. Click Create object data.
ours-from-an-esri-shape- le/)
7. Click OK to close the Attribute Data dialog.

8. Click OK to close the Import dialog.

When the le is done importing, zoom extents to see the results.  Select a contour line and look at the
Properties Palette.  Notice that the AutoCAD Elevation property is 0, but that we also have an “OD”
category in Properties.  This is the object data that we brought in with le.  Note which eld contains
your elevation data, then save and close the le.

Part B – Connect to the Imported DWG

1. Start another new drawing.

2. If the Map Task Pane is not currently showing, type MAPWSPACE at the command line and select On.

(http://www.thecadmasters.com/wp-content/uploads/2011/03/20110309-TaskPane.jpg)

3. In the Map Explorer tab, right-click Drawings and click Attach.

4. Click the Create/Edit Aliases button, (http://www.thecadmasters.com/wp-content/uploads/2011/03/20110309-


CreateEditAliases.jpg),  if the drawing is not on the C drive.  Otherwise, skip to step 11.
5. Enter a name for the Drive Alias.  Note that it can be multiple characters, but no spaces are allowed.
0 AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/) CIVIL DESIGN & SURVEYING(HTTP://WWW.THECA
acebook.com/sharer.php?
masters.com%2F2011%2F03%2F16%2Fassign-
6. In the Drive Alias Administration dialog, click Browse.
urs-from-an-esri-shape- le%2F)
7. In the
0 Choose Directory dialog, select the location where you saved the dwg in Part A.
itter.com/intent/tweet?
url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
8. Click OK.
-an-esri-shape- le%2F&via=CADMasters)
0
us.google.com/share?
9. In the Drive Alias Administration dialog, click Add.and then click Close.
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
10. In the Select drawings to attach dialog, for Look in, select the Alias that you just created.
est.com/pin/create/link/?
0
/2011/03/16/assign-elevations-to-contours-from-
11. Select the drawing previously created in Part A, click Add.
n-esri-shape-
evations+to+Contours+from+an+ESRI+Shape+File)
12. Click
0 OK.
.linkedin.com/cws/share?
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
2
masters.com/2011/03/16/assign-
ours-from-an-esri-shape- le/)

(http://www.thecadmasters.com/wp-content/uploads/2011/03/20110309-Attach.jpg)

Part C – Query to Assign Elevations.

1. In the Task Pane on the Map Explorer tab, expand Query Library, right-click Current Query and click De ne.

2. Click the Location button.  Select All

3. Click OK.

4. For the Query Mode, select Draw.

5. Click Alter Properties.

6. Select Elevation and click Expression.

7. In the Property Alteration Expression dialog, expand Object Data, expand the object data table and select the eld
that contains the elevation data

8. Click OK.

9. In the Set Property Alterations dialog, click Add

10. Click OK.

11. Click Execute Query.


Zoom extents, and there you have it, your contours in the drawingCIVIL
0 AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/) withDESIGN
the proper elevations
& SURVEYING(HTTP://WWW.THECA
acebook.com/sharer.php?
assigned.  Save the new drawing and then detatch the rst drawing.  (On the Map Explorer tab of the
masters.com%2F2011%2F03%2F16%2Fassign-
urs-from-an-esri-shape- le%2F)
Task 0Pane right-click your drawing and click Detatch).  You may discard it if you like.  Be careful using
itter.com/intent/tweet?
url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
this technique with live data as it is possible to modify the attached drawings.  If you think that other
-an-esri-shape- le%2F&via=CADMasters)
GIS tools such as this would be helpful, consider Map 3D training
0
us.google.com/share?
dmasters.com/2011/03/16/assign-
(http://www.cadmasters.com/training1.asp?typesoft=typegeospatial)
tours-from-an-esri-shape- le/) to take full advantage of your
est.com/pin/create/link/?
software.
0
/2011/03/16/assign-elevations-to-contours-from-
n-esri-shape-
evations+to+Contours+from+an+ESRI+Shape+File)
TAGS: ATTRIBUTES
0 (HTTP://WWW.THECADMASTERS.COM/TAG/ATTRIBUTES/), CONTOURS (HTTP://WWW.THECADMASTERS.COM/TAG/CONTOURS/),
.linkedin.com/cws/share?
DBF (HTTP://WWW.THECADMASTERS.COM/TAG/DBF/),
dmasters.com/2011/03/16/assign- ELEVATION (HTTP://WWW.THECADMASTERS.COM/TAG/ELEVATION/), MAP 3D
tours-from-an-esri-shape- le/)
(HTTP://WWW.THECADMASTERS.COM/TAG/MAP-3D/), OBJECT DATA (HTTP://WWW.THECADMASTERS.COM/TAG/OBJECT-DATA/), SHP
(HTTP://WWW.THECADMASTERS.COM/TAG/SHP/),
2 SHX (HTTP://WWW.THECADMASTERS.COM/TAG/SHX/), TOPO
masters.com/2011/03/16/assign-
(HTTP://WWW.THECADMASTERS.COM/TAG/TOPO/), TOPOGRAPHY (HTTP://WWW.THECADMASTERS.COM/TAG/TOPOGRAPHY/)
ours-from-an-esri-shape- le/)

NEIL BONDY (HTTP://WWW.THECADMASTERS.COM/AUTHOR/NEIL/)

0 (http://pinterest.com/pin/create/link/?
0
(http://www.facebook.com/sharer.php?
0
(https://twitter.com/intent/tweet?
0
(http://plus.google.com/share?
0 2
(https://www.linkedin.com/cws/share?
url=http://www.thecadmasters.com/2011/03/16/assign-elevations-to-contours-from-
(http://www.thecadmasters.com/2011/03/16/assign-
+to+Contours+from+an+ESRI+Shape+File&url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassig
u=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
 url=http://www.thecadmasters.com/2011/03/16/assign-
url=http://www.thecadmasters.com/2011/03/16/assign-
elevations-to-contours-from-an-esri-shape-
elevations-to-contours-from-an-esri-shape- elevations-to-contours-from-an-esri-shape-
an-esri-shape-
elevations-to-contours-from-an-esri-shape-
elevations-to-contours-from-an-esri-shape-
le%2F&via=CADMasters)
le%2F) le/) le/) le/)
le/&media=&description=Assign+Elevations+to+Contours+from+an+ESRI+Shape+File)

2 COMMENTS

Leave a Reply
Your email address will not be published.
AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/)
Thank you so so much Neil, you are a true master :D
0 CIVIL DESIGN & SURVEYING(HTTP://WWW.THECA
acebook.com/sharer.php?
masters.com%2F2011%2F03%2F16%2Fassign-
It did worked for me :)
urs-from-an-esri-shape-
Regards! le%2F)
0
itter.com/intent/tweet?
url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
-an-esri-shape- le%2F&via=CADMasters)
0
us.google.com/share?
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
est.com/pin/create/link/?
0
/2011/03/16/assign-elevations-to-contours-from-
n-esri-shape-
evations+to+Contours+from+an+ESRI+Shape+File)
0
.linkedin.com/cws/share?
dmasters.com/2011/03/16/assign-
Fabiola
tours-from-an-esri-shape- le/)
2
masters.com/2011/03/16/assign-
ours-from-an-esri-shape- le/)
fgondomi@gmail.com

Website

SUBMIT COMMENT

Related News
(http://www.thecadmasters.com/2014/03/28/map (http://www.thecadmasters.com/2013/12/06/conn
3d-2015-top-new-features/) to-esri-arcsde-using-autocad-map-3d-fdo/)

AutoCAD Map 3D 2015 Top New Features Connecting to ESRI ArcSDE using AutoCAD Map 3D FDO
(http://www.thecadmasters.com/2014/03/28/map-3d-2015- (http://www.thecadmasters.com/2013/12/06/connecting-to-
top-new-features/) esri-arcsde-using-autocad-map-3d-fdo/)

(http://www.thecadmasters.com/2013/01/21/fede
transportation-legislation-map-21/)

Federal Transportation Legislation MAP-21


(http://www.thecadmasters.com/2013/01/21/federal-
transportation-legislation-map-21/)

Back to blog (http://www.thecadmasters.com/0)


0 AUTOCAD(HTTP://WWW.THECADMASTERS.COM/CATEGORY/AUTOCAD/) CIVIL DESIGN & SURVEYING(HTTP://WWW.THECA
acebook.com/sharer.php?
masters.com%2F2011%2F03%2F16%2Fassign-
urs-from-an-esri-shape- le%2F)
0
itter.com/intent/tweet?
url=http%3A%2F%2Fwww.thecadmasters.com%2F2011%2F03%2F16%2Fassign-
-an-esri-shape- le%2F&via=CADMasters)
0
us.google.com/share?
dmasters.com/2011/03/16/assign- (http://www.thecadmasters.com)
tours-from-an-esri-shape- le/)
est.com/pin/create/link/?
0
/2011/03/16/assign-elevations-to-contours-from-
n-esri-shape- COPYRIGHT ©2017, CAD MASTERS, INC.. ALL RIGHTS RESERVED.
evations+to+Contours+from+an+ESRI+Shape+File)
0
.linkedin.com/cws/share?
dmasters.com/2011/03/16/assign-
tours-from-an-esri-shape- le/)
2
masters.com/2011/03/16/assign-
ours-from-an-esri-shape- le/)

Potrebbero piacerti anche