How To: Create a custom projection file to align CAD Data in ArcMap 10.1 and above
The instructions provided describe how to create a custom projection file for CAD data, and how to align the CAD file with other data in a projected coordinate system with units of feet, meters, or other linear units in ArcMap 10.1 and above.
Note: These instructions apply to ArcGIS versions 10.1 through 10.2.2. For 10.0 and previous versions, please see Knowledge Base article 32939.
Note: These instructions cannot be used to align CAD data with data in a Geographic Coordinate System, with units of decimal degrees. Reference data must be in a projected coordinate system with units of feet or meters.
Follow these steps in ArcMap to align a CAD file (AutoCAD DWG or Microstation DGN) with other data by creating a custom projection file.
Open ArcMap with a new blank map, and add the data the CAD file is supposed to align with. This data must have a projection defined, and the data units must match the units (feet or meters) used when creating the CAD file.
Add only the polyline layer from the CAD file to the map.
Note: In the Add Data dialog, navigate to the folder where the CAD data resides on the computer. Double-click the name of the CAD file, and select the Polyline layer to add it to the map.
Click the Full Extent button, and use the Measure tool to measure horizontally the distance the CAD polylines lie away from the data in the real-world coordinate system (in the east-west direction only.) Do not measure diagonally.
Note: If the data cannot be seen, right-click the name of the layer in the Table of Contents, and select Zoom to Layer. Drop a Marker symbol from the Drawing toolbar on the data, and zoom to the full extent. Repeat for the reference data if necessary, or if the Marker symbol is not visible.
Note: It is helpful to write down these measurements on a piece of paper with a direction arrow, indicating the direction the CAD data must move to align with the other data.
Go to View > Data Frame Properties > Coordinate System tab. Double-click the Projected Coordinate System name in the top box that is assigned to the ArcMap Data Frame. This opens the Projected Coordinate System properties dialog.
Type in a new name for the projection file in the Name text box. A new name is required because the existing name is linked to a well-known ID (WKID) in the program, so changing the properties of the projection without changing the name causes complications.
Note: The new name cannot contain special characters or spaces, but underscores can be used.
In the Projected Coordinate System Properties dialog, under Parameters, there is a value for False Easting.
Note: Making the False Easting value larger moves the CAD file west. Making the False Easting value smaller moves the CAD data east.
Add or subtract the measured distance from Step 3 above from the existing False Easting value, and enter the new value in the field.
Note: ArcMap calculates coordinate position to 16 significant digits, so the zeros to the right of the decimal must be retained.
Click OK on the Projected Coordinate System dialog box, and click Apply on the Data Frame Properties dialog box to apply changes.
The CAD data moves east or west to more closely align with the reference data.
Click the Add To Favorites button (star icon in the upper right corner of the Coordinate System tab), and click OK in the Data Frame Properties dialog box. This saves the custom projection file to disk.
Use the Measure Tool again, this time measuring vertically the offset between the CAD data and the reference data in a direct line, in the north-south direction only.
Note: It is helpful to write down these values, with a direction arrow.
Once again, go to View > Data Frame Properties > Coordinate System tab > Double-click to open the projection file being modified. The North-South adjustment is made by changing the False Northing value.
Note: Making the False Northing larger moves the data south. Making the False Northing smaller moves the data north.
Adjust the False Northing value by the offset value measured in Step 9. If the CAD data is too far south, subtract to make the False Northing value smaller. If the CAD data is too far north, add to make the False Northing value larger.
Click OK in the New Projected Coordinate System dialog box. Click Apply in the Data Frame Properties dialog box to apply the changes.
Click the Add to Favorites button again to save the custom projection file, and click OK in the Data Frame Properties dialog box.
Note: Once the projection file is added to the Favorites folder, it cannot be added again unless the file name is changed. Appending an _1, _2, etc., serves this purpose.
Repeat these steps as needed, making incremental adjustments to the False Easting and False Northing, until the alignment of the CAD polylines to the reference data is the best possible result.
Note: Keep in mind: The CAD data may not align exactly with the available reference data, because of inaccuracies in one or both sets of data.
When the final version of the projection file has been achieved, click the Add to Favorites button one more time.
Click Apply, and click OK on the Data Frame Properties dialog box. Save the MXD file in ArcMap.
Locate the saved custom projection file in the following location in Windows Explorer:
C:\Users\<user profile>\AppData\Roaming\ESRI\Desktop10.x\ArcMap\Coordinate Systems
Note: If the AppData folder is not visible, ensure 'Show hidden files, folders, and drives' is checked in Folder Options.
a) To display hidden files and folders, open the Control Panel and click Folder Options. b) On the View tab, under Advanced settings, click Show hidden files, folders, and drives, and click OK.
There are two options for using the custom projection file to define the projection for the CAD data.
A) If there are no spaces in the CAD file name, paste a copy of the PRJ file into the same folder with the CAD file. Rename the PRJ file with exactly the same name as the CAD file. This is case-sensitive. For example, if the CAD file name is 'Parcels022007-G.dwg', name the PRJ file 'Parcels022007-G.prj'.
B) If the CAD file has spaces in the name, the above process does not work. In this case, copy the custom PRJ file into the directory with the CAD file, and rename the PRJ as esri_CAD.prj.
Note: If multiple CAD files in the same local coordinate system are stored in the folder, the custom projection file named 'esri_CAD.prj' will define the projection for ALL the CAD files in the same folder.
The next time the CAD file is added to ArcMap, the software recognizes the projection definition, and is able to project the data on-the-fly, along with any other data in the map.
Note: Three chapters in the book titled 'Lining Up Data in ArcGIS: A Guide to Map Projections, Second Edition' are devoted to detailed instructions for this process, and address such questions as identifying custom units, or creating a custom projection file for rotated CAD data, which are too technical to address in this article. For additional assistance, contact Esri Support Services on the web, or by phone at 888-377-4575.