IModelCloneContext Class

Beta  

The context for transforming a source Element to a target Element and remapping internal identifiers to the target iModel.

Methods

Name Description
constructor(sourceDb: IModelDb, targetDb?: IModelDb): IModelCloneContext Construct a new IModelCloneContext.  
dispose(): void Dispose any native resources associated with this IModelCloneContext.  
filterSubCategory(sourceSubCategoryId: string): void Filter out geometry entries in the specified SubCategory from GeometryStreams in the target iModel.  
findTargetCodeSpecId(sourceId: string): string Look up a target CodeSpecId from the source CodeSpecId.  
findTargetElementId(sourceElementId: string): string Look up a target ElementId from the source ElementId.  
isSubCategoryFiltered(subCategoryId: string): boolean Returns true if this SubCategory is being filtered.  
remapCodeSpec(sourceCodeSpecName: string, targetCodeSpecName: string): void Add a rule that remaps the specified source CodeSpec to the specified target CodeSpec.  
remapElement(sourceId: string, targetId: string): void Add a rule that remaps the specified source Element to the specified target Element.  
remapElementClass(sourceClassFullName: string, targetClassFullName: string): void Add a rule that remaps the specified source class to the specified target class.  
removeElement(sourceId: string): void Remove a rule that remaps the specified source Element.  

Properties

Name Type Description
hasSubCategoryFilter Accessor ReadOnly boolean Returns true if there are any SubCategories being filtered.  
isBetweenIModels Accessor ReadOnly boolean Returns true if this context is for transforming between 2 iModels and false if it for transforming within the same iModel.  
sourceDb Readonly IModelDb The source IModelDb.  
targetDb Readonly IModelDb The target IModelDb.  

Defined in

Last Updated: 11 June, 2024