Exporting a CAD .dwg file to a .dgn

Exporting a CAD .dwg file to a .dgn

Posted by DJ Schwarz on Apr 26, 2013 3:53 pm

I recently had the request to save one of our CAD drawing files to .dgn Bentley file.  The CAD file was on a modified State Plane Coordinate system which was set up in the drawing settings in Civil 3D 2012.  I also sent them a point file to import the points.  Fast forward 9 months....we are requested to stake some points on the same project to locate some underground pipes.  The coordinates on the points were called out in the construction drawings.  We checked a few points that were above ground and found that most points were off my 3 or so feet E/W.  I quickly checked my drawing to make sure that nothing had changed, checked control, etc..  It all worked.  I then remembered the Int' l foot to US foot conversion in our area which is about 3 feet.  I contacted the design company about the problem.  They pointed their finger at me because they used the dgn file that I supplied them, which they used for their base.  They "converted it to US Survey feet" when they opened it and used it for their base drawing for their project because they noticed that it was in "Plain Feet and inches".   We will be doing some more work down the line for them and we will clear it up during the next round of topo. 
Now, my question?  does a .dgn file add unit settings?  I have never worked with Bentley, so I am asking this to protect myself down the road if this request ever comes in again.
I also think that the other company should have asked me a few questions before they changed something because they "noticed" that the untis were different.  Don't want to rock the boat too much with more work coming.

Re: Note: This Should Be In The DWG

Posted by Paul in PA on Apr 29, 2013 1:44 pm

"COORDINATES: NAD 83 SPC "Your State" South,  (US SURVEY FEET)."

Then 3 points should be identified with SPC and Ortho height if appropriate/

I cannot imagine a drawing of mine suddenly getting the coordinates to move to international foot positions a few feet away without some else fiddling with the coordinates.

Paul in PA

Re: Exporting a CAD .dwg file to a .dgn

Posted by eea123 on Apr 29, 2013 7:18 pm

Couple of questions, what did the contract state and who's contract was it?  If it was theirs and it stated DGN, well then you might have some exposure.  If it was yours and it didn't state the CAD platform, or possibly that they would even get electronics, I'd say it was their onus to verify.  Make sure that you are certain the survey data points you sent them are in the coordinate system of your AutoCAD C3D base drawing - no translation by C3D during importing or anything?  This would again bloster your position of the original coordinate system.  I am not aware of plain Microstation doing coordinate anything, I recall master units and subunits were set more due to interger precision rather than Ft vs Int Ft, ...  I have mainatined a dual platform project for a client 10+ years ago using EaglePoint as the second "D" in CADD for both AutoCAD and MicroStation.  I think Bentley's InRoads might be one of the only dual platform design packages left?

Re: Exporting a CAD .dwg file to a .dgn

Posted by Crystal Thomas on May 30, 2017 4:56 pm

This has been a common problem with DGN files.  DWG files are not specific in units (aside from templates or wblocks for inches versus feet where references would be scaled by 12).  Think of lengths in units.  With DGN files, the file inherently has its own units.  It is a setting per DGN file.  This does not make any difference when using the file by itself, but CADD files are often used with references or xrefs.  This is where the problem comes when using MicroStation (MS).  When referencing a file, MS "looks at" the units of the current (active) file and compares it to the units of the reference file.  If the two are not the same, MS "helps out" by scaling the reference file by the appropriate conversion.  Therefore, if you write graphics to a file whose units are international feet, BUT the actual coordinates of say, the control points are meant to be in US survey feet, then when you reference your control file into another file with US survey feet units, now your control points will not appear in the correct place...they have now been scaled by 0.999998 about 0,0,0. 

There is a way to fix this.  That way is NOT to simply go to the units setting in MS and change it.  This will NOT work.  All that happens when you do that, is more scaling by MS...still relocating the original points to a different location, when the actual coordinates are correct.  If you "info" your graphic point and read the coordinates and find that they are correct, but just your unit setting is wrong, you must start a new empty file using the correct seed (with the correct units).  Then reference in your problem file (with the wrong units) BUT when you reference it, look at the dialog box and turn off the check mark next to "true scale".  This tells MS to do no scaling, just put the file on top of the other with coinciding 0,0,0.  Then select all the graphics and copy them into the new empty file.  Or use right click, 'merge into master' on your reference dialog box.  Most important step here is to TURN OFF TRUE SCALE option.
What often happens with MS files that originated as AutoCAD files is that someone does a save-as on the DWG to DGN and everything looks fine.  Then when you check the units on your resulting DGN file, the units are Feet, not US survey feet.  Out-of-box MS does not recognize the US survey feet unit at all.  There is a file on your C-drive called units.def (it's a simple text file) which has a long list of available units for conversions, save-as, new file, etc.  But many of them are commented out, with the # sign before the unit.  US survey feet is commented out.  First, you need to fix that.  Remove the # sign before US survey feet.
Then when you do the save-as, you must go into the options dialog box and choose your units.  This way MS knows what units you need and is not left to its own devices to guess at it.

It seems to me that the OP's issue was caused when the other firm "converted it to US Survey feet when they opened it and used it for their base drawing for their project because they noticed that it was in "Plain Feet and inches".  I believe this means that they just went in and changed the unit setting, instead of doing what I described to fix the unit problem.  Like I said, when you save-as, everything looks fine, the coordinates report back correctly and nothing is out of place until you use another file with the correct units as a reference.  Ultimately, I would say the onus fell on you to provide them a correct file in correct units, but there is blame for them too.  Because instead of changing your file, they should have come back to you when they noticed the problem.  Once they "converted it to US Survey feet", I believe they took on the responsibility of error because that action screwed things up as well.

Everyone working in MS, realize when you start using files with and from another firm, always check the units on the DGN file first.  Also, remember that reference files should always be referenced 'coincident WORLD', not just 'coincident'.  This is important because of the global origin of a DGN file.  In simple words, using coincident WORLD, you always assure that 0,0,0 with the reference file coincides with 0,0,0 of the master active file.  If not, the two files align themselves by "design plane (or cube)" limits.  This is never what you want.  It will work sometimes, but only if both files have the same global origin.  A global origin is just "where on the maximum design plane is the origin of your coordinate system".  Is it at the very bottom of the plane (or cube), the middle?  It really doesn't matter much because the design plane has over 2 million units available, so your 0,0,0 can be in many places.  The point is, without "coincident WORLD" the two files will not have their 0,0,0 aligned and that seems to be always what we want.

Believe me, we had a nightmare at my company when we combined DWG files from one photogrammetrist with DGN files from two others.  The DGN files were supposed to be in US survey feet, but had Feet as units.  I was tasked with straightening the mess out.  Graphics had been improperly merged, combined, etc.  I had to clip graphics at obvious seams and scale sections manually by selecting and using the scale tool on the graphics to unscale graphics that had been scaled when referenced into the new US survey foot file.  Ironically, the graphics from the AutoCAD file were the least trouble because they hadn't been scaled from feet to US survey feet at all.  It was left alone and understood as generic units.  Like I said, you need full control over the save-as process.  You need to be choosing units when you do a save-as from DWG to DGN.  If you are not getting to choose, I'll bet you 99 out of 100 times, MS will choose wrong.  So just check your units on your resulting DGN file and if it does not look right, STOP and do not do anything else until you straighten that out.  You'll be slowed down a bit now, but it will avoid a big mess later.

Re: Exporting a CAD .dwg file to a .dgn

Posted by Rob M on Jul 6, 2018 2:28 pm

Actually this issue is as old as Cadd itself and not related to a specific software. The problem really is most people do not pay attention to the actual units and settings in their files, they just open and go. All cadd files are "unitless" at their most basic core. When a user defines units, then the software uses that value for dimensioning graphics and nothing else.
Crystal is correct when she states you should use "coincident world" for referencing into a DGN. I always check the units of a drawing when I first open it, if I don't know the origin.
Be especially careful with files received from architects.