material takeoff
auto_material_takeoffGenerate a material takeoff from an AutoCAD shopdrawing by reading legend/quantity tables and computing conduit/wire lengths and device counts from geometry for XLSX or CSV output.
Instructions
List a shopdrawing's materials and compute their quantities from geometry.
The sheet's own tables name the types -- its legend and the conduit / wire
quantity tables -- while the quantities, a placeholder (n) on the
drawing, are computed here: conduit and wire by summed drawn length, devices
by count. A conduit type is identified by its conductor count, so the
geometry on every E-CD-…(nC)… layer of a type adds up into the table's
row for it.
The .dwg is read headless (the core converts it; the input is never
written). Devices and wire carry a symbol block, rendered to PNG and, with
out, embedded in the XLSX's KÝ HIỆU column (CSV keeps the block's
name as text instead). rules is an optional materials.map.json
overriding the layer rules from the profile's materials section. A layer
no rule claims, a wire with no conduit to pair with, and a symbol that will
not render are reported in issues, never guessed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "auto_material_takeoff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | ||
| out | No | ||
| path | Yes | ||
| unit | No | m | |
| rules | No | ||
| images_dir | No | ||
| with_images | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||