IModelDb.Elements Class

The collection of elements in an IModelDb.

Methods

Name Description
createElement<T extends Element>(elProps: ElementProps): T extends Element Create a new instance of an element.  
deleteAspect(aspectInstanceIds: Id64Arg): void Delete one or more ElementAspects from this iModel.  
deleteElement(ids: Id64Arg): void Delete one or more elements from this iModel.  
getAspects(elementId: Id64String, aspectClassFullName?: string): ElementAspect[] Get the ElementAspect instances that are owned by the specified element.  
getElement<T extends Element>(elementId: Id64String | GuidString | Code | ElementLoadProps): T extends Element Get an element by Id, FederationGuid, or Code  
getElementProps<T extends ElementProps>(elementId: Id64String | GuidString | Code | ElementLoadProps): T extends ElementProps Get properties of an Element by Id, FederationGuid, or Code  
getRootSubject(): Subject Get the root subject element.  
hasSubModel(elementId: Id64String): boolean Returns true if the specified Element has a sub-model.  
insertAspect(aspectProps: ElementAspectProps): void Insert a new ElementAspect into the iModel.  
insertElement(elProps: ElementProps): Id64String Insert a new element into the iModel.  
queryChildren(elementId: Id64String): Id64String[] Query for the child elements of the specified element.  
queryElementIdByCode(code: Code): Id64String | undefined Query for the Id of the element that has a specified code.  
tryGetElement<T extends Element>(elementId: Id64String | GuidString | Code | ElementLoadProps): T extends Element | undefined Get an element by Id, FederationGuid, or Code  
tryGetElementProps<T extends ElementProps>(elementId: Id64String | GuidString | Code | ElementLoadProps): T extends ElementProps | undefined 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

Last Updated: 13 June, 2024