consedge.

Comparing DWG revisions with AI: from drawing diff to quantity takeoff

Zakhar Vityk, CEO, Consedge Tech

Two versions of a floor plan arrive: the existing building and the proposed renovation. Someone has to work out what changed, measure it and price it. Today that is usually a person with two PDFs and a highlighter.

AI can take much of that work, but not by reading two drawings and announcing the answer. This article explains how to compare DWG revisions in a way that produces numbers you can trust, and where a language model belongs in the pipeline.

Why comparing DWG files is hard

  • No reliable identity. An entity that was erased and redrawn is a new object to the file, even if it is the same wall.
  • Layers drift. One revision uses A-WALL, the next uses A-WALL-NEW and A-WALL-DEMO.
  • Blocks get exploded. A door that was a block becomes four lines and an arc.
  • Everything shifts. A drawing moved by a few millimetres differs everywhere and nowhere.
  • Meaning is implicit. Nothing in the file says "this pair of lines is a wall".

A visual overlay shows that something changed. It does not say what, how much, or what it costs.

The pipeline

  1. Parse. Read both files into structured data: entity type, layer, geometry, block name, attributes, text. Open-source libraries read DWG without AutoCAD.
  2. Normalize. Bring both drawings to the same units and origin. Canonicalize polylines so direction and start point do not matter. Round to a tolerance.
  3. Match. Pair entities across the two revisions: by handle where it survived, otherwise by geometry, type and layer within tolerance. The output is four sets: unchanged, modified, added, removed.
  4. Classify. Turn entities into building elements: walls, doors, windows, rooms, fixtures.
  5. Measure. Lengths of new and demolished walls, counts of doors and fixtures, areas of changed rooms.
  6. Price and review. Quantities meet unit rates from the estimator's price book. A person reviews the result on an overlay before it goes anywhere.
Code measures, a language model reads names, a person approves

The language model touches one step, and its answers are stored as rules so the next run is repeatable.

Where AI belongs

StepBest toolWhy
Parsing, normalizing, matchingDeterministic codeGeometry needs exact, repeatable answers
Mapping layers and blocks to element typesLanguage model, then stored as rulesLayer names are language: abbreviations, typos, other languages
Reading notes, legends and schedulesLanguage modelFree text
MeasuringDeterministic codeArithmetic must be reproducible
Summarizing the change in plain wordsLanguage modelThat is what it is good at
ApprovingA personMoney is involved

The rule is the same one we apply elsewhere: code measures, the model interprets, a person approves. Our article on AI assistants explains the principle in more detail.

Why not give both drawings to a language model?

It is the first thing everyone tries. It runs into three limits.

Size. A real floor plan has tens of thousands of entities. That does not fit usefully in a prompt, and cost grows with every drawing.

Precision. Language models are unreliable at exact geometry from raw coordinates. A wall length that is nearly right is wrong for an estimate.

Repeatability. The same two files must give the same quantities every time. A deterministic diff does. A model asked twice may not.

Vision models that compare two rendered images have the same weakness in a different form. They are good at pointing to where things changed and weak at measuring.

What makes the result trustworthy

  • A review overlay. Added elements in one colour, removed in another, each with its quantity. An estimator can check a floor in minutes.
  • A fixed test set. Pairs of drawings with a takeoff done by hand. Every change to the pipeline is run against it, and accuracy is reported per element type.
  • A record of every mapping. When the model decides that layer "PARTITION-N" means new partition walls, that decision is stored, shown and editable. It becomes a rule for the next drawing from the same office.
  • Honest failure. Entities the pipeline cannot classify are listed, not dropped.

What the drawings must provide

The quality of the input decides most of the outcome:

  • consistent layers, or at least layers a person can map once,
  • drawings at real scale with known units,
  • before and after drawn in the same coordinate system, or with clear common geometry such as grids,
  • blocks for repeated objects.

Drawings prepared by the same architect for the same project compare far better than files from different sources.

Where this is useful

  • Renovation estimating. Existing against proposed, with demolition and new work measured separately.
  • Change orders. What exactly differs between the tender set and the revised set.
  • Design tracking. A contractor's record of what each revision changed.

Our work in this area

Drawing comparison is part of our AI engineering work. We explored this pipeline in a proof of concept for a renovation estimating platform, with pairs of architect-prepared drawings, existing and proposed, as the input. On the code side we use open-source DWG libraries listed in our repository guide.

If you have a comparison or takeoff task in mind, book a Feasibility Review. Bring three pairs of real drawings and the takeoff you produced by hand. You get a written verdict on what can be measured automatically and where the risks are. More: AI engineering.

FAQ

Can AI compare two DWG files?

Yes, as part of a pipeline. Code finds and measures the differences, and a language model interprets layers, notes and the meaning of the change.

Why not just overlay two PDFs?

An overlay shows where drawings differ. It does not classify the change or produce quantities.

How accurate is an automated takeoff from DWG?

It depends on how disciplined the drawings are. Measure it on your own files against a manual takeoff before relying on it.

Does this work with PDF drawings?

Vector PDFs can be parsed in a similar way, with less structure. Scanned drawings need image recognition and are less reliable.

Working on something like this?

Bring the prototype — yours, your vendor’s, or the one an AI tool generated — and we tell you exactly what it takes to ship it.

  • First call free, no obligation
  • Straight answers
  • Fixed-price written verdict
  • Senior engineers, not account managers
Request a Production Readiness AuditBook a Feasibility Review
AI Engineering for AEC

Share this article