IModelImporter Class

Beta

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  
deleteElement(elementId: Id64String): void Delete the specified Element from the target iModel.  
deleteRelationship(relationshipProps: RelationshipProps): void Delete the specified Relationship from the target iModel.  
importElement(elementProps: ElementProps): Id64String Import the specified ElementProps (either as an insert or an update) into the target iModel.  
importElementMultiAspects(aspectPropsArray: ElementAspectProps[]): 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): Id64String Import the specified RelationshipProps (either as an insert or an update) into the target iModel.  
onDeleteElement(elementId: Id64String): 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): Id64String 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): Id64String Protected Create a new Model from the specified ModelProps and insert it into the target iModel.  
onInsertRelationship(relationshipProps: RelationshipProps): Id64String Protected Create a new Relationship from the specified RelationshipProps and insert it into the target iModel.  
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 If true (the default), auto-extend the projectExtents of the target iModel as elements are imported.  
targetDb IModelDb The read/write target iModel.  

Defined in

Last Updated: 12 February, 2020