Use case · Construction Tech

Parse floor plans and elevations into structured data for takeoff and automation.

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.

Join the beta · Free 50/mo →Read the docs
01THE PROBLEM

Construction data is locked inside CAD files.

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.

02HOW CADLENS HELPS

Walls, rooms, doors, text — all as JSON.

Submit a drawing to POST /v1/parse. Once the job is COMPLETED, the result contains three data objects directly useful for construction-tech workflows:

  • vectorJson — every entity in the drawing: polylines (walls, room boundaries, site perimeters), block inserts (doors, windows, fixtures), text (room labels, dimensions, annotations), arcs, hatches (filled regions like concrete or insulation), and circles.
  • layersJson — layer names, colors, and per-layer entity counts. Use this to identify which layers carry wall geometry, which carry dimensions, and which carry mechanical/electrical content you may want to exclude from a floor-plan takeoff.
  • metadata — drawing units and bounding box (width, height) of the drawing extents. Essential for converting pixel coordinates to real-world measurements.

A rendered PNG preview is also available, useful for displaying the drawing to the end user before triggering a takeoff or automation workflow.

03API WORKFLOW

From drawing upload to structured data in one request.

A typical integration in a construction-tech platform:

  1. A user or subcontractor uploads a DWG or DXF. Your backend posts it to 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.
  2. Poll GET /v1/jobs/{job_id} until status is COMPLETED (or handle the webhook callback). Status values: PENDING → PROCESSING → COMPLETED or FAILED.
  3. Fetch GET /v1/jobs/{job_id}/result. Filter vectorJson by layer name to isolate wall geometry, room boundaries, or fixture inserts.
  4. Run area calculations, door/window counts, or text extraction on the filtered entities to populate your takeoff or document automation output.
04RELEVANT DATA

Fields that matter for construction workflows.

Construction-tech applications typically use the following fields from the CADLens result:

  • entities[].type === "polyline" — wall segments and room boundary lines. Closed polylines represent complete room or space boundaries usable for area calculation.
  • entities[].vertices{ x, y } point array. Use for perimeter length (sum of segment distances) and polygon area (shoelace formula for closed polylines).
  • entities[].type === "insert" — block inserts for doors, windows, columns, and fixture symbols. Each insert carries blockName, insertionPoint { x, y }, scale, and rotation. Count and locate openings by block name.
  • entities[].type === "text" — room labels, area tags, elevation marks, and general annotations. Each text entity carries value (the string content), insertionPoint, height, and rotation.
  • entities[].layer — cross-reference with layersJson to filter by discipline (architectural, structural, mechanical) using layer-naming conventions.
  • metadata.units and metadata.boundingBox — convert drawing coordinates to real-world measurements and validate overall drawing extents against known site or floor dimensions.
05EXAMPLE OUTPUT

What a floor plan result looks like.

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.

06LIMITATIONS

Scope and known constraints.

CADLens extracts 2-D drawing entities. Construction drawings bring specific challenges to be aware of:

  • External references (XREFs) — DWG files frequently reference external drawing files for base plans, structural grids, or site plans. CADLens parses the model space of the submitted file; it does not resolve or fetch XREF attachments. For full geometry you will need to submit a DWG with XREFs bound in, or submit each file separately.
  • Block inserts vs. exploded geometry — doors and windows stored as block inserts are returned as 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.
  • Layer naming conventions — CADLens returns layer names exactly as stored in the file. Mapping layer names to disciplines (A- for architectural, S- for structural, M- for mechanical) is your application's responsibility. There is no built-in semantic layer classifier.
  • 3D geometry — elevation and section drawings with 3D geometry or solids are parsed for their 2-D entity representation. ACIS/SAT solid bodies are not yet extracted. Complex 3D models are better served by a BIM API.
07 — FAQ

Common questions.

CADLens parses standard DWG, DXF, and DWF files. AutoCAD Architecture files are DWG files and parse correctly. Revit does not export DWG natively from the Revit API, but Revit-exported DXF and DWF files are supported. Model-space 2-D plan drawings work best; 3D BIM geometry is not yet extracted.

Most CAD standards place walls on a layer named A-WALL, WALL, or similar. layersJson gives you every layer name and entityCount. Filter vectorJson by entity.layer to get only wall polylines. If the file uses AIA or ISO layer naming conventions, the layer name is a reliable discriminator.

Yes. Closed polylines on the floor-plan layer represent room or space boundaries. Compute the bounding box of each closed polyline (min/max of vertices.x and vertices.y) for approximate room extents, or compute the polygon area using the shoelace formula. metadata.units tells you the drawing unit so you can convert to square metres or square feet.

Doors and windows in CAD drawings are typically block inserts (type: "insert" in vectorJson) referencing a standard symbol block. CADLens returns insert entities with their insertion point, block name, scale, and rotation. Your code can identify door blocks by block name (e.g. "DOOR-36", "WINDOW-48") to count openings and their locations.

Text entities (type: "text") are included in vectorJson with their insertion point, the text string, layer, height, and rotation. This lets you extract room names, area labels, elevation marks, and other annotations that construction-tech workflows need for document automation.

CADLens handles DWG versions back to R12 and all DXF versions in common use. The entity schema is normalised — the same vectorJson structure regardless of which CAD tool produced the file. Variation in layer naming and block-naming conventions is your responsibility to map in your application logic.

JOIN THE BETA

Start parsing construction drawings. Free 50 parses/month.

Extract floor plan data, layer geometry, and annotations from DWG and DXF files via a simple REST API call.

Join the beta · Free 50/mo Read the docs
— RELATED

Keep reading.