IModelImporter Class

Base class for importing data into an iModel.

see iModel Transformation and Data Exchange

see IModelExporter

see IModelTransformer

Methods

Name Description
constructor(targetDb: IModelDb, options?: IModelImportOptions): IModelImporter Construct a new IModelImporter  
computeProjectExtents(): void Optionally compute the projectExtents for the target iModel depending on the options for this IModelImporter.  
deleteElement(elementId: string): void Delete the specified Element from the target iModel.  
deleteRelationship(relationshipProps: RelationshipProps): void Delete the specified Relationship from the target iModel.  
importElement(elementProps: ElementProps): string Import the specified ElementProps (either as an insert or an update) into the target iModel.  
importElementMultiAspects(aspectPropsArray: ElementAspectProps[], filterFunc?: (a: ElementMultiAspect) => boolean): void Import the collection of ElementMultiAspects into the target iModel.  
importElementUniqueAspect(aspectProps: ElementAspectProps): void Import an ElementUniqueAspect into the target iModel.  
importModel(modelProps: ModelProps): void Import the specified ModelProps (either as an insert or an update) into the target iModel.  
importRelationship(relationshipProps: RelationshipProps): string Import the specified RelationshipProps (either as an insert or an update) into the target iModel.  
onDeleteElement(elementId: string): void Protected Delete the specified Element from the target iModel.  
onDeleteElementAspect(targetElementAspect: ElementAspect): void Protected Delete the specified ElementAspect from the target iModel.  
onDeleteRelationship(relationshipProps: RelationshipProps): void Protected Delete the specified Relationship from the target iModel.  
onInsertElement(elementProps: ElementProps): string Protected Create a new Element from the specified ElementProps and insert it into the target iModel.  
onInsertElementAspect(aspectProps: ElementAspectProps): void Protected Insert the ElementAspect into the target iModel.  
onInsertModel(modelProps: ModelProps): string Protected Create a new Model from the specified ModelProps and insert it into the target iModel.  
onInsertRelationship(relationshipProps: RelationshipProps): string Protected Create a new Relationship from the specified RelationshipProps and insert it into the target iModel.  
onProgress(): void Protected This method is called when IModelImporter has made incremental progress based on the IModelImporter.progressInterval setting.  
onUpdateElement(elementProps: ElementProps): void Protected Update an existing Element in the target iModel from the specified ElementProps.  
onUpdateElementAspect(aspectProps: ElementAspectProps): void Protected Update the ElementAspect within the target iModel.  
onUpdateModel(modelProps: ModelProps): void Protected Update an existing Model in the target iModel from the specified ModelProps.  
onUpdateRelationship(relationshipProps: RelationshipProps): void Protected Update an existing Relationship in the target iModel from the specified RelationshipProps.  

Properties

Name Type Description
autoExtendProjectExtents boolean | { excludeOutliers: boolean } If true (the default), compute the projectExtents of the target iModel after elements are imported.  
doNotUpdateElementIds Readonly Set<string> The set of elements that should not be updated by this IModelImporter.  
progressInterval number The number of entity changes before incremental progress should be reported via the IModelImporter.onProgress callback.  
simplifyElementGeometry boolean If true, simplify the element geometry for visualization purposes.  
targetDb Readonly IModelDb The read/write target iModel.  

Defined in

Last Updated: 29 November, 2022