Importing XML Files Shifting Data Based on Units

Applies to:
All Civil 3D products

Issue:
When importing XML files, they do not come in properly

Causes:
This problem is triggered by the units of the exported XML and the units set in the DWG file you are importing into

Solution:
When importing an XML, you need to pay attention to the linearUnit: in the dialog box:
 
Or 
 

If the XML file was exported as foot, and you import that into a geolocated file (US Survey feet), or import a US Survey foot into an International Foot based drawing, in the command line you can see that transformation is occurring:
 

 

That will cause a shift in the geometry that is imported:
 

In addition, if there are breaklines or other surface data in the file, it will not be processed correctly into the surface, but will be drawn in (making the surface not exactly the same as what was exported):
 

To prevent this shift from occurring, it’s best to import into a drawing with the same units set up, and if that surface is needed, you will need to Externally Reference (XREF) the drawing into your file or Data reference the imported XML data and Data Reference it into the drawing with the correct units set and promote it.

About the Author

Ryan Wunderlich

Support Team Manager - AEC Team<br><br>An AutoCAD Certified Professional, Ryan is responsible for taking client cases and assisting with issues with the software - everything from regular glitches to software deployments and whatever else goes wrong. He's proficient in AutoCAD-based software, Revit, Navisworks, 3ds Max, customization of software and deployments, LISP and VBA Coding

Follow on Linkedin More Content by Ryan Wunderlich
Previous Article
Text appear smaller and out of line after exporting to PDF from Civil 3D 2025
Text appear smaller and out of line after exporting to PDF from Civil 3D 2025

When exporting to PDF from Civil 3D 2025, Text styles with some specific system fonts (e.g. Calibri), and a...

Next Article
Civil 3D: Horizontal Conditionals - Part 3  (Finishing Touches)
Civil 3D: Horizontal Conditionals - Part 3 (Finishing Touches)

This three-part series reviews how to make best use of Horizontal Conditionals in Civil 3D (part 3).

Civil 3D Classes Now Available

Learn More