Monday, September 19, 2011

Exporting to shapefile

Since our last upgrade to arcmap 10.0 took place I've started having problems exporting shapefiles from Autocad civil 3D 2010 and 2012 to ArcMap compatible files. Using "mapexport" in Civil 3d to export my polygons worked without any problems when sharing between Civil 3D 2010 and ArcMap 9.* but not with this newer version.
Trying to add your shapefile into ArcMap 10 will produce a window with the following message....

"Open Failed"
"Error opening feature class"
"Number of shapes does not match the number of table records"

The file should be repairable by using ArcCatalog however files with this type of error are not even accessable by ArcCatalog. The best solution I've found is to use a program called "shapecheck.exe" When running shapecheck you'll be asked for the path and name of the shapefile needing repair. After selecting the file follow the onscreen instrucitons to "Build SHX" then "Check DBF" and lastly selecting quit to exit the program.

Running my shape files through this program takes only a couple of seconds and results in useable shape files with no known issues or problems. At this point I am not sure if this is an isolated problem with my installation so I haven't made this repair program available on our server. If you are having this same problem with your shape files please contact me so I can provide you with a copy of shapecheck.exe
Thanks,
William



2 comments:

  1. Hi William, I have experienced the same thing as you. I have found another work around that may be a bit easier but still as annoying. When I export the SHP, whether it be a point/line/polygon, is I add a piece of data to it (polygon, select AREA, etc) and then the shape file reads fine in ArcGIS 10

    ReplyDelete
  2. Great advice! What application or editor do you use to add the data to your shape file?

    ReplyDelete