Copy elements
copy_elementsCopies elements with their openings (as their source) and fills; type and material stay shared. New revision, effect report (n_changed, rejected, cloned, carried). A call that succeeds is not a job that's done. Target: guid, guids or a set from find_elements/get_selection, never a filter. Beyond the named: PLAN_REQUIRED, run its plan_id with expect_beyond. A whole takes its parts along into its own aggregation (by or to_storey). Ports go along, each copy its own, in the rel form the file holds (Nests or HasPorts); a link between two copied elements is copied per copy, one to outside stays with the source (free_ports). Other nested parts, and a port off its element's placement or nesting a port, refuse the call, nothing copied. Offset by a vector, n times, distributed between two points, or into other storeys (same plan position). The copies get new GlobalIds and stand in the report with their source. A type object (named alone, no offset) becomes a new type of the same class: own property sets, shared RepresentationMaps, its occurrences stay; a type from nothing: create_elements with the type class.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "copy_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of copies, each by the offset from the previous; more: call again from the last copy | |
| by | No | Offset of the (first) copy in m | |
| set | No | A set id from find_elements or get_selection: writes exactly the elements seen there, nothing that matches later. An element changed since reading is rejected alone; the others are written | |
| guid | No | One element (GlobalId) | |
| note | No | Your note, stored with the new revision | |
| guids | No | These elements (GlobalIds) | |
| source | No | Where the values you write come from: assumption (default, your own estimate, stamped in the file) or user (only what the person named word for word; it then reads as the file does) | |
| between | No | n copies evenly between these bounds, none on them: body centres at from + k*(to-from)/(n+1), in plan; heights stay | |
| dry_run | No | Preview: the planned effect and a plan_id, nothing written | |
| plan_id | No | Execute exactly the plan a dry_run returned, all or nothing; the plan holds target and fields. Plans that clone the same shared object (type, material) run one after the other: plan the second after the first ran, else PLAN_CHANGED | |
| to_storey | No | Copy into this storey (Name or GlobalId), height follows its Elevation; a list: one copy into each, in one revision | |
| attributes | No | IFC attributes of the created element: Name, Description, Tag ... | |
| request_id | No | Your id for this call: a repeat answers the first result and writes nothing | |
| expect_count | No | With set: how many elements the set holds - guards against a mixed-up set id | |
| expect_beyond | No | With plan_id: how many elements the plan reaches beyond those named (n_beyond of PLAN_REQUIRED or the dry_run) | |
| expect_contacts | No | Intended contacts: checks.contacts splits into as_expected, missing, surprises; an omitted kind is not judged |