Count elements
get_element_countsCount Archicad elements by type, story, layer, or renovation status using filters to get a quick project overview before detailed queries.
Instructions
Counts elements per type — optionally also per story, per layer and per renovation status — with the same filters as find_elements. Output: {total, byType: {Wall: 12, ...}, byStory?: [{storyIndex, storyName, total, byType}], byLayer?: [{layer, total, byType}] (largest first), byRenovationStatus?}. Good first call to get an overview of a project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| types | No | Only these element types. Default: every main type (sub-elements such as curtain wall panels, stair treads or railing posts are only included when listed here or with includeSubelements=true) | |
| layers | No | Only elements on these layers (layer names are localized, e.g. Russian — take them from get_attributes or earlier results) | |
| locked | No | true = only locked elements, false = only unlocked ones | |
| region | No | Spatial filter on the element's 3D bounding box (2D elements have a flat box at z=0). Give any subset of the limits; e.g. {xMin:0, yMin:0, xMax:10, yMax:8} for a plan rectangle | |
| filters | No | Archicad visibility/editability filters; an element must pass ALL of them | |
| groupBy | No | Extra breakdowns; per-type counts are always returned | |
| grouped | No | true = only grouped elements, false = only ungrouped ones | |
| stories | No | Only elements whose home story is one of these | |
| elementId | No | Element ID (the ID shown in the Info Box) wildcard pattern, case-insensitive: '*' = any characters, '?' = one character; without wildcards the ID must match exactly. Examples: 'W-*', '*01', 'D-0??' | |
| groupGuid | No | Only members of this group (nested groups included); groupGuid comes from get_element_details | |
| inHotlink | No | true = only elements that come from a hotlinked module, false = only own elements | |
| storyIndex | No | Only elements whose HOME story is this one (index or localized name, see get_stories) | |
| hotlinkGuid | No | Only elements belonging to this hotlink instance | |
| libraryPart | No | Library part name contains this text (case-insensitive). Applies to objects, lamps, windows, doors, skylights and zone stamps; other types are excluded. Names are localized | |
| excludeTypes | No | Skip these element types | |
| selectedOnly | No | Only elements in the current selection | |
| withinElements | No | Restrict the search to these elements (e.g. to refine an earlier result) | |
| renovationStatus | No | Only elements with one of these renovation statuses | |
| includeSubelements | No | Also list sub-elements (curtain wall/stair/railing parts, beam/column segments) when 'types' is not given, and the hidden GDL part Objects/Lamps owned by curtain walls, railings and stairs (skipped otherwise, counted in stats.ownedPartObjectsSkipped). Default false |