Show Navigation | Hide Navigation

Export to CAD (Conversion) (ArcInfo only)

Release 9.2
Last modified April 2, 2008
E-mail This Topic Printable Version Give Us Feedback


Related Topics

This function will create one or more CAD drawings based on the values contained in one or more input feature classes or feature layers and supporting tables.

Learn more about how Export CAD works


Usage tips

Command line syntax
An overview of the Command Line window
ExportCAD_conversion <in_features;in_features...> <DGN_V8 | DWG_R14 | DWG_R2000 | DWG_R2004 | DWG_R2005 | DWG_2006 | DWG_R2007 | DXF_R14 | DXF_R2000 | DXF_R2004 | DXF_R2005 | DXF_R2006 | DXF_R2007 > <Output_File> {Use_Filenames_in_Tables | Ignore_Filenames_in_Tables} {Overwrite_Existing_Files | Append_To_Existing_Files} {Seed_File}

Parameter Explanation Data Type
<in_features;in_features...>

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

Feature Layer
<DGN_V8 | DWG_R14 | DWG_R2000 | DWG_R2004 | DWG_R2005 | DWG_2006 | DWG_R2007 | DXF_R14 | DXF_R2000 | DXF_R2004 | DXF_R2005 | DXF_R2006 | DXF_R2007 >

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. Types include DGN-V8, DWG-R14, DWG-R2000, DWG-R2004, DWG-R2005, DWG-R2006, DWG-R2007, DXF-R14, DXF-R2000, DXF-R2004. DXF-R2005, DXF-R2006, DXF-R2007.

String
<Output_File>

The pathname 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".

CAD Drawing Dataset
{Use_Filenames_in_Tables | Ignore_Filenames_in_Tables}

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

  • IGNORE_FILENAMES_IN_TABLES — Ignores the paths in the document entity fields and allows the output of all entities to a single CAD file.
  • USE_FILENAMES_IN_TABLES — 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. This is the default.

Boolean
{Overwrite_Existing_Files | Append_To_Existing_Files}

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

  • APPEND_TO_EXISTING_FILES — Allow the output file content to be added to an existing output CAD file. The existing CAD file content will not be lost.
  • OVERWRITE_EXISTING_FILES — THe output file content will overwrite the existing CAD file content. This is the default.

Boolean
{Seed_File}

An existing CAD drawing whose contents, document, and layer properties will be used for all new output CAD files. If appending to existing CAD files, the seed drawing is ignored.

CAD Drawing Dataset
Data types for geoprocessing tool parameters


Command line example

ExportCAD_conversion 'WaterLines_fc;CADWaterValves_lyr;Streets_fc;Parcels_fc;CADPipeAnno_lyr;CADZoneBoundaries_lyr DGN_V8 town.dgn Ignore_Filenames_In_Tables Overwrite_Existing_Files C:\cad\seed\municipal2Seed.dgn

Scripting syntax
About getting started with writing geoprocessing scripts
ExportCAD_conversion (in_features, Output_Type, Output_File, Ignore_FileNames, Append_To_Existing, Seed_File)

Parameter Explanation Data Type
in_features (Required)

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

Feature Layer
Output_Type (Required)

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. Types include DGN-V8, DWG-R14, DWG-R2000, DWG-R2004, DWG-R2005, DWG-R2006, DWG-R2007, DXF-R14, DXF-R2000, DXF-R2004. DXF-R2005, DXF-R2006, DXF-R2007.

String
Output_File (Required)

The pathname 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".

CAD Drawing Dataset
Ignore_FileNames (Optional)

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

  • IGNORE_FILENAMES_IN_TABLES — Ignores the paths in the document entity fields and allows the output of all entities to a single CAD file.
  • USE_FILENAMES_IN_TABLES — 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. This is the default.

Boolean
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.

  • APPEND_TO_EXISTING_FILES — Allow the output file content to be added to an existing output CAD file. The existing CAD file content will not be lost.
  • OVERWRITE_EXISTING_FILES — THe output file content will overwrite the existing CAD file content. This is the default.

Boolean
Seed_File (Optional)

An existing CAD drawing whose contents, document, and layer properties will be used for all new output CAD files. If appending to existing CAD files, the seed drawing is ignored.

CAD Drawing Dataset

Data types for geoprocessing tool parameters


Script example

# Purpose: To Export to an AutoCad file, with each layer being created from the Name field in the feature class.
# Create the Geoprocessor object
import arcgisscripting
gp = arcgisscripting.create()

# Local variables...
province = "C:/Project/canada.mdb/prov/province"
province3 = "C:/Project/canada.mdb/prov/province"
provinces_DWG = "C:/Project/provinces.DWG"

try:
    # Process: Set CAD Alias...
    gp.SetCADAlias_conversion(province, "AREA AREA VISIBLE;CODE CODE VISIBLE;NAME Layer VISIBLE;POP1991 POP1991 VISIBLE;POP91_SQMI POP91_SQMI VISIBLE;Shape_Length Shape_Length VISIBLE;Shape_Area Shape_Area VISIBLE", )

    # Process: Export to CAD...
    gp.ExportCAD_conversion("'C:/Gp/Python/ESRI/Conversion/esri_exportcad/Model/canada.mdb/prov/province'", "DWG_R2000", provinces_DWG, "Use_Filenames_in_Tables", "Overwrite_Existing_Files", "")

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

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.