IModelDb.Elements Class

The collection of elements in an IModelDb.

Implements

Methods

Name Description
createElement<T extends Element>(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.  
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, excludedClassFullNames?: Set<string>): ElementAspect[] Get the ElementAspect instances that are owned by the specified element.  
getElement<T extends Element>(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  
getFederationGuidFromId(id: string): undefined | string    
getIdFromFederationGuid(guid?: string): undefined | string    
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.  
queryLastModifiedTime(elementId: string): string Query for an Element's last modified time.  
queryParent(elementId: string): undefined | string Query for the parent of the specified element.  
tryGetElement<T extends Element>(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<T extends ElementProps>(elProps: Partial<T>): void Update some properties of an existing element.  

Defined in

Last Updated: 14 November, 2024