ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Import CAD Annotation

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts a collection of CAD annotation features to geodatabase annotation. You can convert each level to individual annotation classes or merge them into a single class. Also, if you choose map layers as input, the level and font overrides will be honored.

Usage

  • The conversion requires an exclusive lock so it may not be opened by another application. Output written to a desktop, workgroup, or enterprise geodatabase will not be versioned.

  • You can convert each CAD drawing layer to individual annotation classes or merge them into a single class. Also, if you choose map layers as input, the drawing layers and font overrides will be honored.

  • Choose a reference scale that is roughly equal to the scale at which the annotation will normally be displayed. You can think of the reference scale as "freezing" the symbol and text sizes to a particular map scale. When viewing the map, the symbol and text sizes change depending on the viewing scale. Symbols and text will appear larger as you zoom in (the current map scale is larger than the reference scale) and smaller when you zoom out (the current map scale is smaller than the reference scale).

  • If you select CAD annotation features and/or use a definition query, only those features that are selected and visible will be converted.

  • If you check the option to require symbols to be selected from the symbol table, newly created or updated annotation features must reference one of the predefined symbols in the collection; the symbol cannot be stored inline. When unchecked, you may store any type of annotation (including graphics) in the annotation feature class.

  • Annotation that is feature-linked is associated with a specific feature in another feature class in the geodatabase. If checked, when you create the output annotation feature class, a relationship class will be automatically generated as well. This relationship class defines the relationship between the annotation and the features and enables you to define and customize this relationship. It will not establish the links between features and annotation. That will have to be done within the ArcMap Editor.

Syntax

ImportCADAnnotation_conversion (input_features, output_featureclass, reference_scale, {use_levels}, {match_symbols_from_first_input}, {require_symbol_from_table}, {feature_linked}, {linked_feature_class}, {create_annotation_when_feature_added}, {update_annotation_when_feature_modified})
ParameterExplanationData Type
input_features
[input_features,...]

The CAD annotation features that you want to convert to geodatabase annotation. If you choose a CAD annotation layer in ArcMap, the following properties of that layer will be honored during the conversion:

  • Visible drawing layers. Only those layers that are turned on for drawing will be converted.
  • Substitution of font and color properties for the text symbol.
  • Selection. Only the selected features will be converted.
  • Definition Query. Only visible features that match the definition query will be converted.
Feature Layer
output_featureclass

The geodatabase annotation feature class to which you want to convert CAD annotation.

Feature Class
reference_scale

Enter the scale to use as a reference for the annotation. This sets the scale to which all symbol and text sizes in the annotation will be made relative.

Double
use_levels
(Optional)
License:

This parameter is only available with ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced licenses.

Specify whether all CAD drawing layers or levels will be converted to annotation classes within the feature class.

  • CLASSES_FROM_LEVELS —Each CAD drawing level or layer will be converted to an annotation class within the Output Feature Class. This is the default.
  • ONE_CLASS_ONLY —All CAD drawing levels or layers will be converted to a single annotation class within the Output Feature Class.
Boolean
match_symbols_from_first_input
(Optional)

If you are converting CAD annotation from more than one drawing file and need to substitute the font properties for a symbol and apply that to all the input features, you can use this option.

  • MATCH_FIRST_INPUT —Match the symbols from the first input layer and have them apply to all layers.
  • NO_MATCH —Each drawing file retains its own font properties. This is the default.
Boolean
require_symbol_from_table
(Optional)

Specify if the output annotation features will reference a symbol stored in the symbol collection for the feature class.

  • NO_SYMBOL_REQUIRED —The output annotation features will not reference a symbol stored in the symbol collection for the feature class. This is the default.
  • REQUIRE_SYMBOL —The output annotation features will reference a symbol stored in the symbol collection for the feature class.
Boolean
feature_linked
(Optional)
License:

This parameter is only available with ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced licenses.

Choose whether the output annotation feature class will be linked to the features in another feature class. The feature-linked option will not be available with an ArcGIS for Desktop Basic license.

  • FEATURE_LINKED —The output annotation feature class will be linked to the features in another feature class.
  • STANDARD —The output annotation feature class will not be linked to the features in another feature class. This is the default.
Boolean
linked_feature_class
(Optional)
License:

This parameter is only available with ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced licenses.

The feature class to which you are linking annotation features. The feature class must be a point, line, or polygon feature class. If converting annotation into a desktop, workgroup, or enterprise geodatabase, the link feature class must not be registered as versioned.

This option is only available if you choose FEATURE_LINKED for the previous parameter.

Feature Layer
create_annotation_when_feature_added
(Optional)
License:

This parameter is only available with ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced licenses.

Specify whether new annotation will be generated when you add new features to the feature class to which this annotation feature class is linked.

This option is only available if you choose FEATURE_LINKED for the Feature-linked parameter and specify a Linked Feature Class.

  • AUTO_CREATE —The ArcMap Editor will automatically generate a new piece of annotation when you add new features to the feature class to which this annotation feature class is linked. This is the default.
  • NO_AUTO_CREATE —The ArcMap Editor will not automatically generate a new piece of annotation when you add new features to the feature class to which this annotation feature class is linked.
Boolean
update_annotation_when_feature_modified
(Optional)
License:

This parameter is only available with ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced licenses.

Specify whether to automatically update the placement of annotation when you edit features in the feature class to which this annotation feature class is linked.

This option is only available if you choose FEATURE_LINKED for the Feature-linked parameter and specify a Linked Feature Class.

  • AUTO_UPDATE —The annotation will be repositioned according to the modified feature shape. This is the default.
  • NO_AUTO_UPDATE —The annotation will remain in its original position.
Boolean

Code sample

ImportCADAnnotation Example (Python Window)

The following Python Window script demonstrates how to use the ImportCADAnnotation tool in immediate mode.

import arcpy
arcpy.env.workspace = "C:\data"
arcpy.ImportCADAnnotation_conversion("roads.dxf/annotation", "roads.gdb/roadsanno", 1200, 
                                     "CLASSES_FROM_LEVELS", "NO_MATCH", "NO_SYMBOL_REQUIRED", 
                                     "STANDARD", "", "AUTO_CREATE", "NO_AUTO_UPDATE")
ImportCADAnnotation Example (stand-alone Python script)

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

# Name: ImportCADAnnotation_Example.py
# Description: Create a geodatabase and import CAD annotation into it using the
#              ImportCADAnnotation tool. 

# import system modules 
import arcpy, os
from arcpy import env

# Set environment settings

# User input workspace - eg. C:/data
env.workspace = raw_input('Workspace: ')
# User input data name - eg. roads.dxf
inputCADAnno = raw_input('Data name: ')

# Create file geodatabase based on CAD file
fgdb = env.workspace + os.sep + inputCADAnno[:-4] + ".gdb"
arcpy.CreateFileGDB_management(os.path.dirname(fgdb), os.path.basename(fgdb))

# Set variables
inputFeatureClass = inputCADAnno + os.sep + "Annotation"
outFeatureClass = fgdb + os.sep + inputCADAnno.replace(".", "") + "_Anno"
refScale = 1200
useLevels = "CLASSES_FROM_LEVELS"
matchSymbols = "NO_MATCH"
requireSymbol = "NO_SYMBOL_REQUIRED"
featLinked = "STANDARD"
linkedFeatClass = ""
autoCreate = "AUTO_CREATE"
autoUpdate = "AUTO_UPDATE"

print "Importing CAD annotation..."

try:
    arcpy.ImportCADAnnotation_conversion(inputFeatureClass, outFeatureClass,
                                         refScale, useLevels, matchSymbols,
                                         requireSymbol, featLinked,
                                         linkedFeatClass, autoCreate, autoUpdate) 
    
except:
    # If an error occurred while running a tool print the messages
    print arcpy.GetMessages()

    
print "Import complete"

Environments

  • Current Workspace
  • Output CONFIG Keyword
  • Geographic Transformations
  • Auto Commit
  • Output Coordinate System
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Scratch Workspace

Licensing information

  • ArcGIS for Desktop Basic: Limited
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • Import From CAD
  • Importing coverage and CAD annotation
  • About loading data in ArcMap
  • A quick tour of the geodatabase
  • An overview of the To Geodatabase toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal