Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Dimensions not correct when exported from OnShape



0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 3,603
DXF is unitless and requires the importing system to provide a way to set the units, but it looks like eDrawings defaults to inches with no way to change it (yay).
You can either set your workspace units to inches before exporting or you can create a drawing with the view of the part (which will import into eDrawings correctly).Director, Technical Services, EMEAI1
Answers
You can either set your workspace units to inches before exporting or you can create a drawing with the view of the part (which will import into eDrawings correctly).
DXF specification (Autodesk seems to move the documentation around semi-regularly, so I'm also putting in a link to a downloadable PDF):
http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-A85E8E67-27CD-4C59-BE61-4DC9FADBE74A
https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf
As a workaround, you can switch workspace units to inches, export, then switch workspace units back, and then the DXF should have correctly scaled units.
Edit: looks like I am wrong about the DXF format having units; $INSUNITS does not seem to apply to the whole DXF, but rather seems to be a hint for editors for what scaling to use when inserting additional content into the drawing. Link to the comment in this thread here: https://forum.onshape.com/discussion/comment/70565/#Comment_70565
I couldn't find a $INSUNITS variable, but I did find $MEASUREMENT based on some googling. Changed a 0 to a 1 in a text editor and re-uploaded. Now, my dimensions are correct.
https://www.practicalmachinist.com/vb/cad-cam/there-something-dxf-file-header-indicating-mm-inch-units-357982/
EDIT: Also want to note that I uploaded the same original dxf (before I modified it) to two different vendors. One system asked for the units and scaled the file appropriately. The other did not ask and it was wrong.
https://forums.autodesk.com/t5/autocad-forum/units-settings-within-dxf-files/td-p/7417774
It looks like $INSUNITS and $MEASURMENT variables apply to different things. Based on the above post, it sounds like $INSUNITS is probably only used when it's needed for some sort of attached object. And it looks like $MEASUREMENT is being incorrectly used by some vendors to guess the original drawing units when it really only applies to lines and hatching properties.
In the end, it looks like @NeilCooke is right in that DXF is supposed to be unitless, but different implementations of import software use workarounds to try to assume what the original units were - which causes issues when they're wrong.
I guess since it's the "drawing-units value for automatic scaling of blocks, images, or xrefs when inserted or attached to a drawing" it might be reasonable to assume that the scale applies to existing geometry too? I'm not really sure. I haven't used a 2D CAD system before, so I don't know what the standard practices/conventions are. In any case, it does seem to be that a lot of vendors use it for scaling DXFs in their quoting systems.