How To: Convert AutoCAD DWG files to a GIS-compatible file geodatabase
Instructions provided describe the steps to convert AutoCAD DWG files to a GIS-compatible file geodatabase.
Before performing the following process, the projection for the CAD data must be defined. Refer to the following Knowledge Base article: How To: Identify the spatial reference, projection, or coordinate system of data See also the associated related articles for that procedure.
- In ArcCatalog, create a new file geodatabase to contain the CAD features by right-clicking the folder where the file geodatabase will reside > New File Geodatabase. Rename the file geodabase if desired, but the .gdb extension must be retained. If possible create the new file geodatabase on the local hard drive.
- Open the ArcCatalog window from within ArcMap, right-click the new file geodatabase, and select Make Default Geodatabase.
- Open ArcToolbox > Conversion Tools > To Geodatabase, and select CAD to Geodatabase.
- Browse to the CAD file on disk and select it as the input.
The software automatically creates a feature dataset in the default geodatabase to contain the data, although the name can be changed if desired. The name cannot contain spaces, although underscores can be used.
- Set the Reference Scale for the CAD file. Instructions are provided below for determining an appropriate reference scale for the data.
- Select the projection in which the CAD data was created, or the custom projection created for the CAD file (as above).
- Click OK in the CAD to Geodatabase dialog. The features from the CAD file are imported to feature classes in the feature dataset.
Alternative import method
- Create a new file geodatabase, then right click on the geodatabase, and create a new feature dataset, defining the projection to match the coordinate system in which the CAD data was created.
- Right-click the feature dataset, and select Import > Feature Class (multiple) and browse to the CAD file.
- Double-click the CAD file to open, and select Point, Polyline, Polygon and Multipatch feature classes. Importing annotation by this method creates another point feature class, with each point at the anchor point for the annotation string. The annotation string is preserved in the TextString field in the geodatabase feature class.
- Click OK. The feature types selected are imported to the feature dataset in the geodatabase.
Converting CAD annotation to geodatabase
This method preserves font, text size and text color.
- To determine an appropriate reference scale for the annotation, open a new, empty map in ArcMap, and draw the CAD annotation. Click View > Data Frame Properties. On the General tab, set the map and display units to the units in which the data was created, for example, feet, meters or other units. Zoom in to the annotation until in the screen display of the annotation is rendered at a suitable size for viewing or printing. Once the reference scale is set for the new annotation feature class in the geodatabase, it cannot be changed. The reference scale should be set to a map scale which is typical for the data, either for plotting or on-screen display.
- Open the ArcCatalog window, and navigate to the geodatabase that contains the point, polyline polygon and multipatch features from the CAD file.
- Right-click the feature dataset, and select New > Feature Class. This will contain the annotation.
- Give the new annotation feature class a name, and click Next through the subsequent dialogs.
- Enter the scale value into the Reference Scale box in the New Feature Class dialog in ArcCatalog. For example, the scale in ArcMap may be 1:1200. Type 1200 in the Reference Scale box.
- Click Next > Next.
- In the final dialog where the attribute fields are listed, if you want the attributes from the CAD annotation included in the geodatabase annotation feature class, click the Import button, navigate to the CAD annotation feature class, select it, and click Add. The attributes from the CAD annotation are added to the geodatabase feature class.
- Click Finish.
- After creating the new annotation feature class, close the ArcCatalog window.
- In ArcMap, click Customize > Customize Mode. On the Commands tab, select Label from the Categories list. In the Commands list, note the Convert Coverage Annotation tool. Left-click the tool icon and, holding down the left mouse button, drag it into a toolbar displayed in your ArcMap window. Once the tool has been added to a toolbar, close the Customize dialog box.
- Click the new Convert Coverage Annotation icon, and a dialog box opens asking to select the annotation layer to convert. Click the radio button to add to a database, and click on the folder to navigate to the database, feature dataset and empty annotation feature class to which you wish to add the annotation.
- When the path to the annotation feature class is set, click convert, and the annotation is added to the geodatabase.
Note that when using the 'Convert Coverage Annotation' tool, additional annotation can be added later to the same feature class.
Note: The above methods stress conversion of the CAD data to geodatabase, since the geodatabase data model supports annotation, attribute information stored in the CAD TEXT entities do not have to be re-created after converting the data. If the attributes are not required, draw the CAD points, polylines, polygons or multipatch features in ArcMap, right-click the name of the layer in the Table of Contents (TOC) and select Data > Export Data. The output data can be converted to a simple shapefile, as well as a geodatabase feature class. If only features from a specific Layer or Level from the CAD file are required, Select by Attributes can also be used in ArcMap. After the required features are selected, right-click the name of the Layer in the TOC and select Data > Export Data. Only the selected features are exported. Data can also be sorted by attribute when using the Simple Data Loader, to load data into an existing geodatabase feature class through ArcCatalog.