Export to CAD

Title  Export to CAD

Summary

Geoprocessing tool that creates one or more CAD drawings based on values contained in one or more inputs.


Usage


Syntax

ParameterExplanation
in_features

A collection of feature classes and/or feature layers whose geometry will be exported to one or more CAD files.

Output_Type

The CAD platform and file version of the output files. This value overrides any Output_Type values contained in the keyname column or alias column CADFile_type.

  • DGN_V8—Microstation DGN file
  • DWG_R2018—DWG version 2018
  • DWG_R2013—DWG version 2013
  • DWG_R2010—DWG version 2010
  • DWG_R2007—DWG version 2007
  • DWG_R2005—DWG version 2005
  • DWG_R2004—DWG version 2004
  • DWG_R2000—DWG version 2000
  • DWG_R14—DWG version 14
  • DXF_R2018—DXF version 2018
  • DXF_R2013—DXF version 2013
  • DXF_R2010—DXF version 2010
  • DXF_R2007—DXF version 2007
  • DXF_R2005—DXF version 2005
  • DXF_R2004—DXF version 2004
  • DXF_R2000—DXF version 2000
  • DXF_R14—DXF version 14
Output_File

The path of the desired output CAD drawing file. This name overrides any drawing name information included in the input features columns or alias columns named DrawingPathName.

Ignore_FileNames (Optional)

Allows the function to ignore or use the paths in the DrawingPathName. This allows the function to output CAD entities to specific drawings or ignore this and add to one CAD file.

  • Checked—Ignores the paths in the document entity fields and allows the output of all entities to a single CAD file. This is the default.
  • Unchecked—Allows the paths in the document entity fields to be used and have each entity's path used so that each CAD part will be written to a separate file.
Append_To_Existing (Optional)

Allows the output to append to an existing CAD file. This allows you to add information to a CAD file on disk.

  • Checked—Allows the output file content to be added to an existing output CAD file. The existing CAD file content will not be lost.
  • Unchecked—The output file content will overwrite the existing CAD file content. This is the default.

Code Samples

ExportToCAD example (stand-alone script)

The following stand-alone script demonstrates how to use theExportToCAD tool.


# Description: Create an AutoCAD DWG

# Import system modules
import arcpy

# Set local variables
in_features = "C:/data/EditorTutorial.gdb/StudyArea/Buildings"
output_type = "DWG_R2010"
output_file = "c:/data/Buildings.dwg"

# Process: Export to CAD
arcpy.ExportCAD_conversion(in_features, output_type, output_file, 
                           "USE_FILENAMES_IN_TABLES", "OVERWRITE_EXISTING_FILES")

                    

Tags

Credits

Use limitations