Import XML comes in at wrong coords and scaled

claytonh
Contributor
Contributor

Import XML comes in at wrong coords and scaled

claytonh
Contributor
Contributor

I'm importing a LandXML file of an alignment and it comes in at the wrong coordinates and scaled. It's off by about 6 feet.

The LandXML file came from 2023 Civil3D from the city with a file setup on NM83-WF. I'm using 2022.

The XML file itself shows the 0+00 should be at X=2624088.957 Y=2094698.662 with a length=4187.5506

After I import it, 0+00 X = 2624083.7089 Y = 2094694.4727 with a length 4187.542

I'm guessing there is some sort of scaling happening, but I can't find where or why it's happening.

The XML file is attached if anyone can help I would appreciate it.

 

Clayton Harrison, PE
CHC Engineers, LLC
C3D 2024
0 Likes
Reply
Accepted solutions (2)
2,704 Views
11 Replies
Replies (11)

Kyle-L
Advocate
Advocate

I believe it is a unit conversion error.

 

If I set the drawing units to feet and the conversion to "International Foot" then the alignment coordinates are exactly the same as the LandXml, but if I set the conversion to "US Survey Foot" then I see the problem you are having.

 

I don't know much about feet as I work in metres but try changing the conversion options and see if it helps:

 

KyleL_0-1675231558105.png

 

 

Pointdump
Mentor
Mentor

Hi Clayton,
Maybe a conflict with units? I don't know how you would change the "linearUnit".
Dave

 

Units_1.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
0 Likes

Pointdump
Mentor
Mentor
Accepted solution

Clayton,
I changed linearUnit to "Foot_US" with Notepad++ and now it imports OK. Attached.
Dave

 

Units_2.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024

ChicagoLooper
Mentor
Mentor

Hi @claytonh 

Here are two options.

 

Option 1:

On command line type in  MAPCSASSIGN=>in search box search 2259=>select the result=>click assign

Insert your XML.

 

Option 2:

Insert your XML without assigning a coordinate system. After it's inserted, assign NM83-WF.

 

Chicagolooper

EESignature

0 Likes

claytonh
Contributor
Contributor

It still comes in at the wrong coords. I actually tried this previously. Thanks for the response, but something else is awry.

Clayton Harrison, PE
CHC Engineers, LLC
C3D 2024
0 Likes

claytonh
Contributor
Contributor

Although this does work. Why?

 

I finally received the original drawing that this came from and it's setup on NM83-WF.

I deleted the alignment in that drawing and then imported the new one. It comes in just fine.

I started a new drawing with the _Autodesk Civil 3D (Imperial) NCS.dwt and it comes in fine.

 

This is telling me that there is something in my DWT that is messing things up. But what?

What is it? 

 

Clayton Harrison, PE
CHC Engineers, LLC
C3D 2024
0 Likes

Neilw_05
Mentor
Mentor
Accepted solution

There is a setting in the LandXML export settings that can override the units used in your drawing. If users are not aware of this setting, the consequence can be catastrophic.

 

When importing an XML file into a drawing that has a coordinate system and units assigned, C3D will automatically transform the imported data to match the drawing. If the units in the XML file are different than the drawing, you would see a shift in the imported data.

 

Neilw_0-1675318052905.png

Neilw_0-1675319195189.png

 

 

 

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com

claytonh
Contributor
Contributor

Very dangerous indeed. When I change this setting to Survey Feet, export the XML and insert it into a new drawing, it works. The XML file created has the linearUnit="USSurveyFoot" instead of the original file of linearUnit="foot"

@Pointdump had the right idea and the only way to fix an XML that is sent to you.

 

Interestingly enough, I also get this error exporting the XML. This error ONLY occurs if you have a coordinate system applied.

Type: Warning
Date: 2/2/2023
Time: 10:27:36 AM
Source: Export LandXML
User: clayt
Description: The Drawing 'Imperial to Metric Conversion' setting specified in the Drawing Settings does not match the LandXML 'Imperial Units' setting specified in the LandXML Export Data Settings. Reimporting the exported LandXML file will result in different drawing.

This is such a strange error. Mainly because it's not true.

 

Thanks for all the help!

Clayton Harrison, PE
CHC Engineers, LLC
C3D 2024

Neilw_05
Mentor
Mentor
Apparently they have added a warning since we first encountered this. The way we discovered the setting was after the sewer and water lines were already constructed in the wrong location on a project. We were not aware of the setting and there was NO WARNING from the software about the mis-match at that time. I notified Autodesk about it and they quickly took note.

Will have to test it out.
Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes

claytonh
Contributor
Contributor

Again this really sucks and Autodesk did a huge disservice with the whole US Survey Foot and International Foot thing. I haven't found any reason for these settings other than conversions. Coordinates are coordinates, and unless you know that you need to scale, Civil3D SHOULD NEVER do this for you without your knowing. INSUNITS is another horrible disservice that can scale inserted files - again without your knowledge.

 

But note that the error only pops up when you have a coordinate system set. But the error is not true as the XML comes in correctly. Figure that one out.

 

I have a project that was just built with a water line and sewer line XML that I provided. Now I need to go find out if it was built in the wrong spot. SMH

 

Thanks again for all the help.

Clayton Harrison, PE
CHC Engineers, LLC
C3D 2024

SoaresASBCAD
Collaborator
Collaborator

Just change linearUnit to "Foot_US" with Notepad++ and now it imports OK. Attached.Davev

ASoares
0 Likes