Blog · DXF · 29 Sep 2026 · 2 min read
Why AI reads <> instead of the dimension in a DXF, and where the real number is
Ask an AI agent to read the dimensions of a DXF and it often reports <>. That is not a bug in the AI. What it means, where the drawn value lives, and the script that reads it correctly.
You ask an AI agent to check the dimensions of a DXF, and it tells you every dimension says <>. Or <>x45°. The AI is not wrong and nothing is broken: that is how the DXF format stores dimensions. An agent that knows this reads the right place; one that does not will report nonsense with confidence.
What <> means
A DIMENSION entity has a text field. When it contains <>, it means "put the measured value here". The CAD program measures the distance between the dimension points and replaces <> with the number when it draws the dimension.
Anything around the brackets is kept. <>x45° is drawn as the measured value followed by x45°, a common way to write a bevel. An empty text field also means "show the measured value".
Where the drawn value is
The CAD program saves what it drew in a separate, anonymous block, usually named *D followed by a number. That block contains the lines, the arrows and the text exactly as it appears on the sheet, with the number already filled in.
So there are two places to read from:
- The measurement: the distance between the definition points, computed from the geometry.
- The drawn text: inside the dimension's block, as the drafter saw it.
They usually agree. When they do not, the text was typed over by hand, and that is worth knowing before you cut.
How to read both with ezdxf
import ezdxf
doc = ezdxf.readfile("drawing.dxf")
msp = doc.modelspace()
for dim in msp.query("DIMENSION"):
field = dim.dxf.get("text", "")
measured = dim.get_measurement()
shown = []
block = dim.get_geometry_block()
if block is not None:
for t in block.query("MTEXT TEXT"):
shown.append(t.plain_text() if t.dxftype() == "MTEXT" else t.dxf.text)
print(repr(field), measured, shown)
get_measurement() gives the value computed from the definition points. The block gives what is printed on the drawing. For angular dimensions the measurement comes back as an angle, not a length.
Two cases that look like this but are not
Exploded dimensions. If the drawing was exploded before export, there is no DIMENSION entity at all, only loose lines and texts. The number is a plain TEXT or MTEXT near the lines.
Dimensions inside blocks. A title block or a detail view inserted as a block keeps its dimensions inside that block. Look inside the INSERT with virtual_entities().
Why this matters for cutting
On a cutting drawing the dimension text is what the shop reads. If a script checks sizes from the geometry but the sheet shows a number typed by hand, the two can disagree without anyone noticing. Read both, and flag every dimension where they differ.
Do and don't
Do
- Read both the measurement and the text in the
*Dblock. - Flag every dimension where they differ.
- Look inside
INSERTs for dimensions in blocks.
Don't
- Don't report
<>as the value. - Don't use a
filter_funcwhen rendering: it breaks the*Dblocks. See render a DXF to PNG.
Related: why dimensions change size when DXF drawings are merged.
This is one of the checks we run before any drawing leaves. If you want it run on your files, send us a file.