Create elements
create_elementsCreates Archicad elements such as walls, doors, windows, MEP routes, annotations, and drawings from validated item data; dry-run validation checks schemas and hosts before committing.
Instructions
Create elements of any type Tapir can create. element_type: model wall, beam, column, slab, roof, shell, morph, mesh, stair, railing, railing_polyline, zone, curtain_wall, grid_element, object, lamp; hosted door, window (in a wall), skylight (in a roof or shell), opening; MEP mep_route, mep_element, mep_flexible_segment, mep_take_off (Archicad 28+), electrical_panel, electrical_device, electrical_circuit (Archicad 30); markers section, elevation, interior_elevation, detail_marker, worksheet_marker; hotlink_instance; 2D line, arc, circle, polyline, spline, hatch, hotspot, text, label, keynote_label; dimension, level_dimension, wall_thickness_dimension, section_dimension; drawing (on a layout). Plurals and Tapir command names work too. Items use Tapir's field names and units (metres, radians): call with items=[] to get the item schema for a type, with notes on what the schema leaves out (which heights are absolute, which side a wall's body, a door's swing and a stair's flight lie on). DRY-RUN BY DEFAULT: every item is validated against the schema (any problem: nothing is sent, problems listed by item index and field), a favoriteName and a libraryPartName must exist (closest names suggested), and hosts (a door's wall, the elements a dimension measures, a label's parent) must exist, be the right type and be editable; items failing those are skipped with the reason and the rest go ahead. Most types take the Element ID as 'id' from Tapir 1.7.3 (doors, windows, openings, roofs and morphs do not); on an older Tapir such an item is skipped. Warns when the active window is wrong for the type, when an object or lamp has no dimensions (it would take the tool's current size, not the library part's), when it sends offset or useFixedAngle (Archicad discards them), when a door or window has no sillHeight (it would take the tool's sill), when one placed by libraryPartName leaves the Door or Window tool holding that part, when an absolute height lies off the story floorIndex names, when a stair's flights overlap, and, after the create, when a stair runs past its baseline. Learn a part once with learn_library_part before placing it by placement; a learned part is then placed with no samples. An object, lamp, door or window of such a part may give placement instead: an object's footprint centre, size (length along the head, width across it) and head direction (the head is the end that goes against the wall: a bed's pillow end, a chair's or sofa's back), for coordinates, angle, reflected and dimensions; a door's or window's hinge_near and opens_toward points, for reflected and oSide, and leaves (a recorded leaf state, written right after the create). On a part learned with a Tapir newer than 1.8.0, an object's size may be left out, as may a door's or window's width and height, which then take the part's own. items=[] shows its placement_schema; 'placements' lists what each one derived, and for a door or window the hinge and swing it read. Reading a sketch: choose the part from what it draws, the lines dividing a window give its sashes and the arcs give which sash or leaf opens and where it is hinged; prefer the plain generic part ("Window", "Door", "Double Window") when the sketch says no more. Width is a check: a window about 1.2 m wide is a single or a double window, never a multi-sash one; when the count and the width disagree, ask. A bed's head is the end with the pillows, or with the duvet's turned-back edge; when the sketch shows neither, ask. After placing, look (capture_window) and correct with modify_elements before reporting done. Pass dry_run=false to create: returns created GUIDs, plus Tapir's per-item errors grouped with item indices and by_index (item index -> GUID) when not every item was created, and 'placed_not_set' for an element placed whose leaves Archicad refused. On a Tapir newer than 1.8.0, database ({"guid": ...}, from GetDatabaseIdFromNavigatorItemId) puts lines, arcs, circles, polylines, splines, hatches, hotspots, texts or labels into that layout's, section's or other view's database instead of the active window's.
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": {
"element_type": "<element_type>",
"items": "<items>"
},
"name": "create_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| items | Yes | ||
| dry_run | No | ||
| database | No | ||
| element_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||