Export to CAD (Conversion) (ArcInfo only) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]()
|
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
All input feature classes and/or feature layers and shapefiles are valid inputs to this tool.
This function is generally used as the final tool in the process of converting feature class data to new or existing CAD drawing files according to a predefined set of CAD drawing standards.
If the CAD drawing files specified by the attributes of the exported features exist, CAD objects will be appended to those files. If the CAD files do not exist, the specified CAD files will be created with the standard defaults or using the optional Seed Drawing specified.
If the CAD entity properties are not specified, then entities will be generated using the default entity properties of the drawing file or any existing layer symbology included in the optional seed drawing.
To create cells or blocks with attributes, the definition for the cell or block must be defined in an existing target CAD drawing or defined in the seed drawing.
The Add CAD Fields tool allows you to add the properly named fields recognized by Export to CAD to specify CAD Entity properties for Export to CAD. Assign CAD Aliases allows you to rename existing columns for the same purpose.
The Import from CAD tool does not support the creation of annotation feature classes, but Export to CAD does support exporting annotation feature classes to CAD files.
This tool will not export coverage annotation to any CAD format.
The output filename for a CAD file is not limited to .dwg, .dxf, or .dgn; the extension can be anything the user defines.
If you would like to learn more about how CAD data can be used as direct input to Geoprocessing tools, or a sample workflow involving the Export to CAD tool.
Adding CAD Fields to a table other than a feature class is useful in creating a lookup table that can be used as a way to persist various CAD property definitions. By joining these lookup tables to a feature layer based on some key field existing in both tables, a CAD standard can be defined and reused. These lookup tables can be used over and over to specify how feature class data is represented in CAD drawings.
The following environments affect this tool: extent, scratchWorkspace, and workspace.
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.
|
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.
|
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 |
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.
|
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.
|
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 |
# 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()