Why does my DXF import at the wrong scale?

By Nest Ready · Published

A DXF that imports at the wrong scale is nearly always a units mix-up. A file drawn in millimetres and read as inches comes in 25.4 times too big; one drawn in inches and read as millimetres comes in 25.4 times too small. It happens because a DXF’s coordinates are bare numbers, and many files don’t say which unit they’re in, so the program opening them falls back on its own default. Measure one dimensioned length, divide it by the figure on the drawing, and the ratio tells you what went wrong. Then re-import with the right units, or scale by the exact factor, and check a second dimension at right angles to the first.

How does a DXF file record its units?

Barely. A line in a DXF runs from one pair of numbers to another, and nothing in the entity says whether 160 means 160 mm or 160 inches. Since AutoCAD 2000, the file header can carry a setting called $INSUNITS: 0 for unitless, 1 for inches, 4 for millimetres, and codes for other units. Strictly, it sets the units for inserting the drawing into another one as a block, but many programs read it as the units of the whole file when they import.

That leaves three ways for the units to go missing or go wrong:

  • The format can’t hold them. R12, the version many CAM packages read most reliably, has no $INSUNITS at all. Every R12 DXF is unitless.
  • The file says “unitless”. Plenty of exporters write 0, or leave the setting out, even in newer versions.
  • The file says the wrong thing. The setting comes from the template the drawing was started in, not from how it was drawn. A part drawn in millimetres in a template set to inches says inches, and a careful importer believes it.

What happens when a DXF doesn’t say?

The program opening it decides. Some assume millimetres, some assume inches, some use the units of your current template or last import, and some ask you every time. So the same file can open at the right size on one machine and 25.4 times too big on the next, and nothing about the file has changed.

The units aren’t the only thing that can be off. A DXF made by converting a PDF page comes in at the sheet’s scale, so a view drawn at 1:2 arrives at half size, and the converter may have written the PDF’s own units, points of 1/72 inch, rather than millimetres. Why page converters do that is covered in why PDF to DXF converters bring across the whole drawing. And a drawing that was printed to fit, reduced on a copier or scanned can be the wrong size before any software touches it.

How do you tell what went wrong from one measurement?

Divide the length you measure in CAD by the dimension written on the drawing. Each cause leaves its own ratio:

What the measured-to-drawn ratio usually means
Measured ÷ drawnLikely causeFix
25.4A millimetre file read as inchesRe-import in millimetres, or scale by 1/25.4
0.03937 (1/25.4)An inch file read as millimetresRe-import in inches, or scale by 25.4
1,000 or 0.001Metres and millimetres mixed up, usually from software that works in metresRe-import with the right units, or scale by the exact factor
0.5, 2, 0.2, 5…A page conversion that kept the sheet’s scale: a view drawn at 1:2 comes in at half sizeScale by the view’s scale factor, then check again
2.835 (72/25.4)A converter wrote PDF points (1/72 inch) as units, read here as millimetresScale by 25.4/72, then allow for the sheet’s scale
About 0.707 or 1.414The sheet was printed or saved at the next A size down or up before it was converted or scannedDon’t trust the linework: rebuild the part from its dimensions
Anything else, or different across and downFit-to-page printing, a stretched scan, or a sheet marked not to scaleRebuild the part from its dimensions, or ask for the source file

Different ratios across and down mean the part was stretched, by a scanner, a fit-to-page print or a photo taken at an angle. No single scale factor fixes that.

How do you check a DXF against a reference dimension?

  1. Pick the longest dimensioned length on the part, such as the overall width. A long one shows a small scale error that a short one hides.
  2. Measure it point to point in CAD, snapping to the two endpoints rather than clicking near them.
  3. Work out the ratio to the drawing’s figure and read it against the table above.
  4. Check a second length at right angles to the first. Two that agree rule out stretching; one alone can’t.
  5. Check a hole diameter, which catches a part that was scaled from the wrong reference.

Measure against the written dimensions, never a scale bar or the scale note in the title block: those only hold for the sheet printed at its intended size. If the drawing says “do not scale”, the linework isn’t to be trusted at all, and the part should be built from its dimensions.

How do you fix the scale in CAD or CAM?

  • Re-import with the right units if the import dialog offers a units setting. It’s exact, and it leaves the file as it was. Many CAD/CAM and nesting packages have one; look for “units”, “drawing units” or “scale” in the DXF import options.
  • Otherwise scale by the exact factor: 25.4 or 1/25.4 for a units mix-up, the view’s scale factor for a sheet-scale error. Never use the ratio you measured: a measurement of 159.8 instead of 160 is a misplaced click, not a scale.
  • Scale from the origin, or from a corner of the part, so the part doesn’t land somewhere far off the sheet.
  • Set the units before you save it again. If you pass the file on, save it in a version that records units, with the right units set, or tell the next person what it’s in. A metric shop is safest setting its CAM to import unitless files as millimetres.

For the odd ratios at the bottom of the table, don’t scale at all. The source itself was resized or distorted, so rebuild the part from the written dimensions, or ask the customer for the CAD file. The other checks a DXF needs before it’s cut are set out in what makes a DXF ready for laser cutting.

How does Nest Ready write units?

Nest Ready is our product, and it writes DXFs from drawings, so here is exactly what its files hold. Each DXF is R12, so like every R12 file it can’t record its units. The geometry is at true size in millimetres: sizes are built from the dimensions written on the drawing, not from the sheet’s scale or a scan’s pixels, so a view drawn at 1:2, a sheet printed to fit or a photo taken at an angle doesn’t change them. Inch drawings are converted to millimetres. The part is moved so the corner of its bounding box sits at 0,0.

So import a Nest Ready DXF as millimetres. If your CAD or CAM opens unitless files as inches, the part comes in 25.4 times too big, and the import setting is the fix. To see what to expect, download the DXF from the bracket example: drawn as 160 × 80 on the drawing, it should measure 160 × 80 once imported. More on what Nest Ready does with a PDF in PDF to DXF for engineering drawings.

The limits: every DXF is in millimetres, with no inch option, and because the file is unitless the right size on screen depends on your import setting. Anything uncertain is flagged for review, but review is advisory, so flagged parts you haven’t decided on still download. Check every DXF against the drawing before cutting.

Convert your next engineering drawing to DXF.

Upload a PDF, scanned drawing or drawing image and see the part geometry Nest Ready can extract.

Try 25 parts free No card required. Use your own engineering drawings.

We'd like to use Google Analytics and Google Ads cookies to see which pages help people find Nest Ready and to measure our adverts and show them to people who have visited. Nothing is set unless you accept. Cookie policy