IModelDb.Elements Class

The collection of elements in an IModelDb.Elements.IModelDb.


Name Description
createElement<T extends Element>(elProps: ElementProps): T extends Element Create a new instance of an element.  
deleteAspect(ids: 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, aspectClassName: string): ElementAspect[] Get the ElementAspect instances (by class name) that are related to the specified element.  
getElement<T extends Element>(elementId: Id64String | GuidString | Code | ElementLoadProps): T extends Element Get an element by Id, FederationGuid, or Code  
getElementJson<T extends ElementProps>(elementIdArg: string): T extends ElementProps Read element data from iModel as a json string  
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.  
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.  
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 May, 2019