TB
Work/GeoHelp

Cadastral elaborat generator for a survey office

an evening of retyping → one click

~10sTo produce a full elaboratpreviously a half-day of copying numbers from CAD into Word and Excel
DWG in, Word + Excel outTemplate-preserving fillCroatian grammar passDouble-click .exe

The problemWhere it started

A cadastral survey office in Split produces an Elaborat etažiranja for every multi-unit building it certifies: a Word document that describes each apartment in legal prose, and an Excel recapitulation that totals the floor areas into ownership shares. The numbers and room lists already exist as tables drawn inside the AutoCAD DWG. The geodet was retyping them by hand into both files, twice, for every project. A single misread digit invalidates the share and the document has to be reissued. The work was simple, slow, and the kind of thing that gets worse the more tired you are at the end of a Friday.

Role
Build + Iteration
Duration
4 weeks initial, ongoing
Year
2026
Stack
Python, PySide6, ezdxf, docxtpl, openpyxl, PyInstaller

ApproachWhat we did

  1. 1

    Read the office's existing DWG file directly. The geodet keeps drawing exactly the same tables in CAD, no new template, no second source of truth.

  2. 2

    Convert DWG to DXF with a bundled ODA File Converter, then parse the apartment tables with ezdxf so room names, areas, and apartment labels come out as structured data.

  3. 3

    Fill the office's actual Word and Excel templates without touching their formatting. docxtpl for the Word elaborat, a ZIP-swap of the shared-strings file for the Excel recapitulation, so the printed result is byte-identical to what the office has been sending clients for years.

  4. 4

    Run every room name through a Croatian instrumental-case dictionary so the generated paragraphs read like a person wrote them, not a mail merge.

  5. 5

    Optional pass that reads the construction permit PDF (digital or scanned, OCR via Tesseract with Croatian language data) and lifts out the official building description so the geodet does not retype that either.

  6. 6

    Ship as one Windows .exe. Double-click, pick the DWG, get a Word and an Excel in the same folder. No Python, no install, no internet.

The resultThe numbers after launch

~10s

Per elaborat

previously half a day of retyping
0

Transcription errors since launch

the CAD table is the source of truth

Double-click to run

.exe with bundled converter, no install

DetailsHow it works

1

Read what they already draw

Before each etažiranje the geodet draws the building in AutoCAD: floor plans, and alongside them small tables listing every room of every apartment with its surface area in square metres. Those tables are how the office has worked for decades and they are not going to change. The first decision was to make the tool read those tables straight out of the DWG, exactly as they are drawn today, instead of asking the office to fill in a parallel spreadsheet or a web form.

DWG is a closed Autodesk format, so the tool converts it to DXF first, using a bundled copy of the free ODA File Converter so nothing has to be installed on the office machine. From the DXF, ezdxf walks the table entities and reads the cells back as text. The parser absorbs the way the tables are actually drawn in practice: rooms split across two lines, areas written as 45,96 in one cell and 45.96 in another, occasional notes wedged in beside the area column, apartment labels that drift between S1, Stan 1, and STAN 1 from one project to the next. Each idiosyncrasy is a small rule at the edge. Downstream every calculation gets to assume clean data because the mess was already absorbed.

2

Fill the office's own templates

The office has been sending the same Word elaborat and the same Excel recapitulation to clients for years. Clients, notaries, and the land registry recognise the layout on sight. Changing how the documents look was never on the table, the only thing that needed to change was who was doing the typing.

So the tool fills the office's actual files. The Word template is the existing TEKST.docx with Jinja-style placeholders dropped in between paragraphs, rendered with docxtpl so every font, every tab stop, and every page break survives untouched. The Excel is harder: openpyxl rewrites enough of a workbook to break the office's careful column widths and conditional formatting. So instead, the tool treats the .xlsx as the ZIP archive it really is, edits only the sharedStrings.xml inside it, and writes the bytes back. The result opens in Excel identical to the original, just with the new numbers in the cells the geodet would have typed into. Anything the tool produces can still be opened, tweaked, and resaved by hand, the way the office has always worked.

3

A Croatian grammar pass

The Word elaborat is not a table, it is prose. Every apartment gets a paragraph that reads, roughly, the apartment consists of a kitchen, a room, a bathroom and a hallway, with an attached covered terrace and a storage room. In Croatian those room names change form depending on where they sit in the sentence. A kitchen is kuhinja in the nominative, kuhinjom in the instrumental, and the elaborat needs both, in different paragraphs, for the same room.

Getting this wrong is the giveaway that a document was machine-generated. So the tool carries a small dictionary that maps every room and outbuilding name the office uses from nominative to instrumental, plus a normaliser that folds the office's spelling variants (wc, WC, w.c.) onto one canonical form before the lookup. New words get added to the dictionary the first time they appear in a project, and the next elaborat that uses them just works.

4

Lift the building description out of the permit PDF

One field on the cover page is the official description of the building, the sentence that starts dozvoljava se uporaba and continues for a paragraph of legal language. It lives in the construction permit, a PDF the office already has on file for every project. Retyping it by hand is both slow and error-prone, and changing one word changes the legal meaning.

The tool has an optional button next to that field that opens the permit PDF and pulls the sentence out. If the PDF has a text layer it is read directly. If it is a scan, Tesseract runs over it with the Croatian language pack to OCR the page first. Both paths are bundled into the .exe so the geodet sees one button, not two workflows. The extracted sentence drops into the field, the geodet glances at it once, and the cover page is done.

5

Ship as a double-click

The user is one person who runs a survey office out of a folder of CAD files and a Windows laptop. He does not want a web app, an account, a login, or a cloud anything. He wants to open the program, pick a DWG, and get the two files back in the same folder, the way every other tool he uses works.

The whole program ships as a single .exe built with PyInstaller. The Python interpreter, the ODA converter, the Tesseract binaries, the Croatian language data, the Word and Excel templates, the icon, all bundled inside it. No installer, no admin rights, no internet connection required to run. The first version was built and handed over in four weeks. Since then every change has been a small revision, a new room name in the grammar dictionary, a tweak to the Excel template after a registry clerk asked for a different column label, shipped as a new .exe dropped into the same folder. The tool fits the office's rhythm instead of asking the office to adapt to it.

FERZWS+
Join the businesses that own their software
Ready to build?

Let's build something you actually own.

Tell us what you're trying to build. We'll come back with a clear scope, a fixed quote, and a realistic timeline, usually within a couple of days.

What actually moves the numbers

Once a month: concrete moves from the websites and campaigns we run. No theory, no spam.

By signing up you agree to receive emails. One-click unsubscribe in every one. Privacy Policy