IModelDb.Elements Class
The collection of elements in an IModelDb.
Methods
Name | Description | |
---|---|---|
createElement<T extends Element<T>>(elProps: ElementProps): T | Create a new instance of an element. | |
deleteAspect(aspectInstanceIds: Id64Arg): void | Delete one or more ElementAspects from this iModel. | |
deleteDefinitionElements(definitionElementIds: Id64Array): Id64Set | DefinitionElements can only be deleted if it can be determined that they are not referenced by other Elements. | Beta |
deleteElement(ids: Id64Arg): void | Delete one or more elements from this iModel. | |
getAspect(aspectInstanceId: string): ElementAspect | Get a single ElementAspect by its instance Id. | |
getAspects(elementId: string, aspectClassFullName?: string): ElementAspect[] | Get the ElementAspect instances that are owned by the specified element. | |
getElement<T extends Element<T>>(elementId: string | Code | ElementLoadProps, elementClass?: EntityClassType<Element>): T | Get an element by Id, FederationGuid, or Code | |
getElementProps<T extends ElementProps>(props: string | Code | ElementLoadProps): T | Get properties of an Element by Id, FederationGuid, or Code | |
getRootSubject(): Subject | Get the root subject element. | |
hasSubModel(elementId: string): boolean | Returns true if the specified Element has a sub-model. | |
insertAspect(aspectProps: ElementAspectProps): string | Insert a new ElementAspect into the iModel. | |
insertElement(elProps: ElementProps): string | Insert a new element into the iModel. | |
queryChildren(elementId: string): string[] | Query for the child elements of the specified element. | |
queryElementIdByCode(code: Required<CodeProps>): undefined | string | Query for the Id of the element that has a specified code. | |
queryParent(elementId: string): undefined | string | Query for the parent of the specified element. | |
tryGetElement<T extends Element<T>>(elementId: string | Code | ElementLoadProps, elementClass?: EntityClassType<Element>): undefined | T | Get an element by Id, FederationGuid, or Code | |
tryGetElementProps<T extends ElementProps>(elementId: string | Code | ElementLoadProps): undefined | T | Get properties of an Element by Id, FederationGuid, or Code | |
updateAspect(aspectProps: ElementAspectProps): void | Update an exist ElementAspect within the iModel. | |
updateElement(elProps: ElementProps): void | Update some properties of an existing element. |
Defined in
- backend/src/IModelDb.ts Line 1560
Last Updated: 20 June, 2023