1

This is complex and my first question. I'm using 10.3 and need to export a lot of contour files to CAD. When I do this individually, they convert fine and retain the elevation values. Having hundreds, I used model builder to accomplish this task and the elevation values come out wrong: .0001 feet.

Could the problem be with my iterator? I'm not familiar with these and wonder if not selecting the optional feature type is part of my problem. I'm going to run the model one more time with the "line" feature type selected.

Yes, I have the "Elevation" field properly named for the fickle CAD conversion. I do have an alias for it. Again, I can manually export to CAD without any issues.

  • Import from CAD... ewww! I always have problems with that (and export to CAD). Have you considered OGR2OGR (or would you)? It tends to give better results more reliably, especially if 3d is involved. – Michael Stimson Jun 17 '15 at 22:28
  • You want to import the elevation entity property and use it to label contours in ArcMap? Is this purely cartesian or is there an actual cordinate system used in the source data? When you examine the entity in autocad, does it actually have an elevation? In other words, are the entities actually 3D. If the source drawing was used for plotting plans, many draftsmen ignore the 3D attributes so that such drawing are a medley of 2D and 3D features. I recomend to scrutinize the source drawings and ensure all is correct in autocad before attempting to import to ArcGIS. – Jakub Sisak GeoGraphics Jun 18 '15 at 15:25
  • To be clear, I am exporting from ArcMap to Cad. The end files aren't for me but for another department that needs the hi-res contour data and apparently the files will not render correctly without the elevation values. Again, I can export just fine one file at a time. But I have hundreds and am trying to use model builder and am having no luck. Thanks everyone. I'll update if and when I have a solution. – Mateo Jun 18 '15 at 15:32
  • Are the lines 3d? – TsvGis Jun 19 '15 at 3:49
  • They started in 3D, as that was my first step but I think in the tiling process they lost this. My solution involved running them through the "Feature to 3D by Attribute" tool first. – Mateo Jun 19 '15 at 18:36
1

I was able to convert the numerous tiled contour data files to a CAD format by inserting an additional step into model builder.

I used the "Feature to 3D by Attribute" tool and assigned the elevation field as the "Height" field and then converted to .dxf or .dwg

One of the first things I did with this contour dataset after projecting it was run it through the "Feature to 3D by Attribute" tool, but my suspicion is that when I tiled the massive dataset into square mile tiles that the 3D formatting was lost.

Additionally, while I was able to run the tool outside in model builder and retain the elevation values initially, the tool stopped working. So I may have been incorrect to blame model builder.

Make no mistake, I'm still pretty new at GIS, so I appreciate the help. Thank you.

0

This wont answer why model builder isn't working but its rather another option for bulk conversion to DWG. I have tried this in 10.2.1 on various contour layers (shapefiles) and it converts them to CAD with their elevation still intact. Basically the script finds all the .shp in a specified folder (see arcpy.env.workspace = r"D:\FolderContainingShapefiles") and converts them to a 2010 DWG in the same folder. You can load the script into the python window/shell within ArcMap.

import arcpy
import os

# Set the workspace for the ListFeatureClass function
#
arcpy.env.workspace = r"D:\FolderContainingShapefiles"

# The CAD versions of your outputs
output_type = "DWG_R2010"

try:
    # Use the ListFeatureClasses function to return a list of
    #  all shapefiles from arcpy.env.workspace.

    fcList = arcpy.ListFeatureClasses()

    for fc in fcList:
        # Replaces the .shp with a .DWG
        new_name = fc.replace('.shp','.DWG')

        # Export feature to CAD
        arcpy.ExportCAD_conversion(fc,output_type,new_name)

        print "Converting {}".format(fc)
except:

    # If an error occurs while running a tool print the message
    print arcpy.GetMessages()

print "Done"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.