IModelImporter Class

Base class for importing data into an iModel.

@see - iModel Transformation and Data Exchange

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.  
deleteModel(modelId: string): void Delete the specified Model from the target iModel.  
deleteRelationship(relationshipProps: RelationshipPropsForDelete): void Delete the specified Relationship from the target iModel.  
finalize(): void Needs to be called to perform necessary cleanup operations.  
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...): string[] Import the collection of ElementMultiAspects into the target iModel.  
importElementUniqueAspect(aspectProps: ElementAspectProps): string 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.  
markElementToUpdateDuringPreserveIds(elementId: string): void Marks an element so that it can be updated during import when preserveElementIdsForFiltering is set to true.  
onDeleteElement(elementId: string): void Protected Delete the specified Element (and all its children) from the target iModel.  
onDeleteElementAspect(targetElementAspect: ElementAspect): void Protected Delete the specified ElementAspect from the target iModel.  
onDeleteModel(modelId: string): void Protected Delete the specified Model from the target iModel.  
onDeleteRelationship(relationshipProps: RelationshipPropsForDelete): 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): string 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 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.  
optimizeGeometry(options: OptimizeGeometryOptions): void Examine the geometry streams of every GeometricElement3d in the target iModel and apply the specified optimizations.  

Properties

Name Type Description
doNotUpdateElementIds Readonly Set<string> The set of elements that should not be updated by this IModelImporter.  
options Readonly Required<IModelImportOptions> resolved initialization options for the importer  
progressInterval number The number of entity changes before incremental progress should be reported via the onProgress callback.  
targetDb Readonly IModelDb The read/write target iModel.  

Defined in

Last Updated: 04 November, 2024