com.esri.arcgis.geoprocessing.tools.conversiontools
Class ImportCAD
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.conversiontools.ImportCAD
- All Implemented Interfaces:
- GPTool
public class ImportCAD
- extends AbstractGPTool
Converts a collection of CAD files into feature classes and data tables using a predefined and highly normalized schema for the purpose of further translation into GIS data.
The Import from CAD tool is contained in the Conversion Tools tool box.
Usage tips:
- This tool will output a (.GDB) by default, but will also output an (.MDB) if the user defines the proper extension.
- A fixed set of feature classes will be generated in the specified output feature dataset. These feature classes contain the geometry for the lines, areas, points, and document extent, and optionally, point feature classes can be generated for each unique block or cell name.
- This tool creates a new geodatabase and will not append to an existing one.
- Postprocessing will be required if you need to perform any joins of the data or relationships. The output is data from the CAD inputs and no relationships exist. Its flattened structure allows it to be put back together however you want.
- The Input files parameter will allow the addition of different kinds of CAD data (DGN, DWG, DXF) in one operation.
- CAD property tables are created in the output workspace. These normalized tables can be linked together using key fields, such as the EntID that is also found in the feature classes created by the Import CAD tool.
- If a table in the output feature dataset or workspace has the same name as one created by ImportCAD, the table will be deleted and re-created.
- The Import from CAD tool does not support the creation of annotation feature classes.
- The CAD property tables can be accessed from the output workspace in a model or script using the tool. Likewise, the feature classes generated from the CAD data can be accessed using the Select Data tool on the output feature dataset.
- CAD text and attribute entities are converted to point features.
- Import from CAD cannot output to an ArcSDE feature class; it will create a new personal geodatabase.
- If you are going to copy the DocPath field in the CadDoc feature class or the TextMemo field in the TxtProp table from the staging geodatabase to a ArcSDE geodatabase, there are some limitations you need to be aware of. The DocPath field in the CadDoc feature class and the TextMemo field in the TxtProp table each have a memo field that is too long to fit in an ArcSDE geodatabase. For information about limitations of your ArcSDE geodatabases, see your system administrator. Portions of the information in these fields are duplicated in other fields. They have a shorter field length, so they can be moved to an ArcSDE geodatabase. The DocName field contains portions of the DocPath field, and the TextValue field contains portions of the TextMemo field.
- This function is generally used in the process of translating CAD data to an existing geodatabase using a series of other geoprocessing functions in a script or ModelBuilder model and as such, the resulting data from this function is typically temporary.
- Normalized tables are generated in the specified output workspace. These tables contain the tabular attributes of the layer properties, text properties, entity properties, block or cell attributes, and extended entity data or MSLink values.
- If a projection file exists for the input CAD file it will automatically populate the spatial reference parameter with the projections information. If multiple CAD files are used as inputs the spatial reference will be taken from the first CAD file which has a projection file, in the input list.
- When generating a default spatial reference for the staging geodatabase, you should always use the extent default model of the CAD file as the foundation. This means that if there are entities outside the extents of the default CAD field extents, they could be rejected. Be sure the model with the greatest extent is used as the default model in a DGN drawing. Only MicroStation version 8 supports the use of multiple models in a single design file.
- If a DGN file has multiple models, be sure the first model has the largest domain. Import from CAD calculates the domain for the entire DGN file from the first model. If this is not the case, be sure to expand the domain in your first model to be large enough so all will fit.
- If you use a PRJ file for the spatial reference parameter, be sure to set your x,y,z domain. If you do not set a domain, this could cause some features not to be imported if they fall outside the domain calculated on the fly.
- If you need to convert CAD annotation to geodatabase annotation, there are specific tools for this, such as .
Constructor Summary |
ImportCAD()
Creates the Import from CAD tool with defaults. |
ImportCAD(Object inputFiles,
Object outPersonalGdb)
Creates the Import from CAD tool with the required parameters. |
ImportCAD
public ImportCAD()
- Creates the Import from CAD tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
ImportCAD
public ImportCAD(Object inputFiles,
Object outPersonalGdb)
- Creates the Import from CAD tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inputFiles
- the collection of CAD files to convert to geodatabase features.outPersonalGdb
- the new output geodatabase where all the input CAD features are placed along with the accompanying tables. If you need joins of the tables or features, then postprocessing is required.
getInputFiles
public Object getInputFiles()
- Returns the Input Files parameter of this tool .
This parameter is the collection of CAD files to convert to geodatabase features.
This is a required parameter.
- Returns:
- the Input Files
setInputFiles
public void setInputFiles(Object inputFiles)
- Sets the Input Files parameter of this tool .
This parameter is the collection of CAD files to convert to geodatabase features.
This is a required parameter.
- Parameters:
inputFiles
- the collection of CAD files to convert to geodatabase features.
getOutPersonalGdb
public Object getOutPersonalGdb()
- Returns the Output Staging Geodatabase parameter of this tool .
This parameter is the new output geodatabase where all the input CAD features are placed along with the accompanying tables. If you need joins of the tables or features, then postprocessing is required.
This is a required parameter.
- Returns:
- the Output Staging Geodatabase
setOutPersonalGdb
public void setOutPersonalGdb(Object outPersonalGdb)
- Sets the Output Staging Geodatabase parameter of this tool .
This parameter is the new output geodatabase where all the input CAD features are placed along with the accompanying tables. If you need joins of the tables or features, then postprocessing is required.
This is a required parameter.
- Parameters:
outPersonalGdb
- the new output geodatabase where all the input CAD features are placed along with the accompanying tables. If you need joins of the tables or features, then postprocessing is required.
getSpatialReference
public Object getSpatialReference()
- Returns the Spatial Reference parameter of this tool .
This parameter is the spatial reference to be applied to the Output Staging Geodatabase.
This is an optional parameter.
- Returns:
- the Spatial Reference
setSpatialReference
public void setSpatialReference(Object spatialReference)
- Sets the Spatial Reference parameter of this tool .
This parameter is the spatial reference to be applied to the Output Staging Geodatabase.
This is an optional parameter.
- Parameters:
spatialReference
- the spatial reference to be applied to the Output Staging Geodatabase.
getExplodeComplex
public String getExplodeComplex()
- Returns the Explode Complex Objects parameter of this tool .
This parameter is specifies if block inserts in DWG or DXF and/or cells in DGN will create a feature for each constituent element in the complex object or just a single point feature at its defined insertion point.
This is an optional parameter.
- Returns:
- the Explode Complex Objects
setExplodeComplex
public void setExplodeComplex(String explodeComplex)
- Sets the Explode Complex Objects parameter of this tool .
This parameter is specifies if block inserts in DWG or DXF and/or cells in DGN will create a feature for each constituent element in the complex object or just a single point feature at its defined insertion point.
This is an optional parameter.
- Parameters:
explodeComplex
- specifies if block inserts in DWG or DXF and/or cells in DGN will create a feature for each constituent element in the complex object or just a single point feature at its defined insertion point.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias