queryAspects Method @beta
Stream the ElementAspect instances owned by a set of elements.
Use this method instead of calling IModelDb.Elements.getAspects repeatedly when reading aspects for multiple elements or when the result may be large. The query reads all requested owners together and yields each aspect without buffering the complete result set. For a single element with a small result, IModelDb.Elements.getAspects provides a simpler synchronous API.
The order is unspecified unless groupByOwner is true.
queryAspects(options: QueryAspectOptions): AsyncIterableIterator<ElementAspect>
@returns An async iterator over the matching aspects.
| Parameter | Type | Description |
|---|---|---|
| options | QueryAspectOptions | Defines the element Ids, class filters, result ordering, and query connection. |
Returns - AsyncIterableIterator<ElementAspect>
An async iterator over the matching aspects.
Defined in
- backend/src/IModelDb.ts Line 3344
Last Updated: 03 September, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.