export_dxf
Export takeoff quantities as a DXF CAD drawing. The file uses real units, layer-separated shapes, and room labels, making it ready for CAD workflows.
Instructions
The takeoff as a CAD drawing — a DXF (R2000) AutoCAD, BricsCAD, LibreCAD and Revit import as native geometry, not a picture. ONE sheet per file, like a DWG: every committed shape on that sheet becomes an LWPOLYLINE (floor rings CLOSED, walls and linear runs open, count marks a 1-ft circle), on a layer named for its finish — OT-, with -DEDUCT / -HOLE / -WALL / -LINEAR / -COUNT suffix layers so a CAD user isolates any bucket with one layer filter, and room labels as TEXT on OT-LABELS. Coordinates are real units in the sheet's own frame: origin at the sheet's BOTTOM-left, Y up (CAD convention), feet by default ($INSUNITS 2) or metres with units:"m"; a ring's area in CAD equals its area in export_report to rounding, so the drawing IS the audit. Requires the sheet's scale (refuses otherwise — pixels in a DXF are worse than nothing); with several sheets carrying shapes, pass sheet to choose the drawing (the refusal lists them). The reply names every shape left out and why — a reconciled deduct ships as its parent's -HOLE ring, never twice. Writes to path (required — a DXF lives on disk, next to the DWG it aligns to); pair with export_marked_pdf for the reviewed planset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path to write the .dxf to | |
| sheet | No | Sheet key ("plan.pdf", "plan.pdf#2") or title-block number ("A-101"). Optional only when exactly one calibrated sheet carries shapes | |
| units | No | Output units — "ft" (default) or "m" | |
| overwrite | No | Replace the file at path even when it is not an OpenTakeoff export. Off by default: re-exporting over a previous export of your own already overwrites without this, so you only need it to deliberately destroy an unrelated file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The DXF written | |
| bytes | Yes | ||
| sheet | Yes | Sheet key the drawing was cut from | |
| units | Yes | ||
| layers | Yes | Layer names in table order — OT-<TAG>, plus -DEDUCT/-HOLE/-WALL/-LINEAR/-COUNT suffix layers and OT-LABELS | |
| shapes | Yes | Committed shapes that produced geometry | |
| extents | Yes | Model-space bounding box in output units; origin = sheet's bottom-left, Y up | |
| skipped | Yes | Shapes on this sheet left out, each with why — never silent | |
| entities | Yes | LWPOLYLINE + CIRCLE + TEXT entities in model space | |
| sheet_number | Yes |