CADLens converts DWG, DXF, and DWF construction drawings into machine-readable vector JSON so construction-tech platforms can extract wall geometry, room dimensions, layer data, text annotations, and drawing extents — without installing or maintaining CAD parsing infrastructure.
Floor plans, elevations, and site plans arrive as DWG or DXF files produced by architects and engineers in AutoCAD, MicroStation, or similar tools. The data needed for takeoff, area calculations, door/window counts, and document automation is all there — but it is encoded in a binary or text format that requires a CAD library to read reliably across format versions.
Building and maintaining that library in-house is a significant ongoing engineering cost. Open-source options handle common cases but break on real-world drawings with non-standard layer conventions, external references, or older DWG versions. CADLens provides a hosted parsing service with a stable, versioned JSON output schema.
Submit a drawing to POST /v1/parse. Once the job is COMPLETED, the result contains three data objects directly useful for construction-tech workflows:
A rendered PNG preview is also available, useful for displaying the drawing to the end user before triggering a takeoff or automation workflow.
A typical integration in a construction-tech platform:
POST /v1/parse with Authorization: Bearer <api_key>. For drawings under ~2 MB add wait=true. For larger drawing sets, supply a webhook_url so CADLens calls your endpoint on completion.GET /v1/jobs/{job_id} until status is COMPLETED (or handle the webhook callback). Status values: PENDING → PROCESSING → COMPLETED or FAILED.GET /v1/jobs/{job_id}/result. Filter vectorJson by layer name to isolate wall geometry, room boundaries, or fixture inserts.Construction-tech applications typically use the following fields from the CADLens result:
{ x, y } point array. Use for perimeter length (sum of segment distances) and polygon area (shoelace formula for closed polylines).blockName, insertionPoint { x, y }, scale, and rotation. Count and locate openings by block name.value (the string content), insertionPoint, height, and rotation.layersJson to filter by discipline (architectural, structural, mechanical) using layer-naming conventions.A simplified extract from /v1/jobs/{job_id}/result for a single-storey floor plan DWG (schema version 2024-01):
{
"schemaVersion": "2024-01",
"metadata": {
"units": "mm",
"boundingBox": { "width": 18000.0, "height": 12000.0 }
},
"layersJson": [
{ "name": "A-WALL", "colorHex": "#000000", "entityCount": 48 },
{ "name": "A-DOOR", "colorHex": "#FF0000", "entityCount": 12 },
{ "name": "A-TEXT", "colorHex": "#0000FF", "entityCount": 22 },
{ "name": "A-DIMS", "colorHex": "#888888", "entityCount": 64 }
],
"vectorJson": [
{
"type": "polyline",
"layer": "A-WALL",
"closed": true,
"vertices": [
{ "x": 0.0, "y": 0.0 },
{ "x": 5400.0, "y": 0.0 },
{ "x": 5400.0, "y": 4200.0 },
{ "x": 0.0, "y": 4200.0 }
]
},
{
"type": "insert",
"layer": "A-DOOR",
"blockName": "DOOR-900",
"insertionPoint": { "x": 2100.0, "y": 0.0 },
"scale": { "x": 1.0, "y": 1.0 },
"rotation": 90
},
{
"type": "text",
"layer": "A-TEXT",
"value": "LIVING ROOM",
"insertionPoint": { "x": 2700.0, "y": 2100.0 },
"height": 200,
"rotation": 0
}
]
}From this: one room boundary with perimeter 2 × (5400 + 4200) = 19,200 mm and area 5400 × 4200 = 22.68 m²; one 900 mm door insert at the south wall; the room labelled "LIVING ROOM". Scale the pattern across all closed polylines on A-WALL to build a full room schedule.
CADLens extracts 2-D drawing entities. Construction drawings bring specific challenges to be aware of:
insert entities with insertion point and block name, not as the underlying line geometry. If your workflow needs the actual linework inside a door symbol, the file must have the blocks exploded in the CAD tool before submission.Extract floor plan data, layer geometry, and annotations from DWG and DXF files via a simple REST API call.