Group codes into stable structure
DXF Parser & Tree
See the drawing as explicit, navigable file structure.
Explore source ↗Capability
An iterative parser converts DXF code/value pairs into a hierarchical entity tree with handles, parent metadata, container boundaries, preserved ordering, synthetic end markers, and round-trip serialization.
- 01
Iterative O(n) grouping
- 02
Handles and parent metadata
- 03
Malformed-container recovery
- 04
Round-trip DXF serialization
How it composes
From intent
to working system.
Tokenize
Alternating code and value lines become ordered DXF tags.
Group
An explicit stack builds sections, tables, blocks, objects, and entity children.
Repair
Missing container terminators produce traceable synthetic end nodes.
Serialize
The stored order and hierarchy emit back into DXF text.
Quick start
Adopt this
capability.
Start with the primary module, then add the related packages only when the application needs those layers. Replace VERSION with the current NuGet version.
git clone https://github.com/wieslawsoltes/DxfParser.git# Load components/utils.js and components/dxf-parser.js.const parser = new DxfParser();const nodes = parser.parse(dxfText);
const layerTable = parser.findNodeByIdIterative(nodes, nodeId);const roundTrip = parser.serializeTree(nodes);Modules in this capability
Use one layer.
Compose the rest.
Source of truth
Read the module beside the complete system.
The implementation, samples, issues, and release notes stay in the parent repository so module details remain connected to the product architecture.