dwg-extraction

Installation
SKILL.md

DWG File Extraction

Extract structured construction intelligence from AutoCAD DWG files (including Civil 3D). DWG is a proprietary binary format that requires specialized tooling — this skill handles the full pipeline from raw .dwg to structured project data.

Pipeline Overview

The extraction happens in four stages:

  1. Compile libredwg — Build the open-source DWG reader from source (cached after first run)
  2. Convert DWG → DXF — Use the compiled dwg2dxf binary to produce a text-based DXF file
  3. Parse DXF entities — Custom Python parser extracts all entity types with full attribute data
  4. Structure & store — Organize extracted data into plans-spatial.json sections

The reason we compile from source rather than using a package manager is that libredwg is not available as an apt package in most environments, and Python DXF libraries (like ezdxf) often fail on Civil 3D DXF output due to malformed MATERIAL entries from proprietary objects. The manual parser in this skill handles these edge cases gracefully.

Installs
37
GitHub Stars
1
First Seen
Mar 17, 2026
dwg-extraction — mgoodman60/foreman-os-plugin