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: Id64String): void Filter out geometry entries in the specified SubCategory from GeometryStreams in the target iModel.  
findTargetCodeSpecId(sourceId: Id64String): Id64String Look up a target CodeSpecId from the source CodeSpecId.  
findTargetElementId(sourceElementId: Id64String): Id64String Look up a target ElementId from the source ElementId.  
isSubCategoryFiltered(subCategoryId: Id64String): 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: Id64String, targetId: Id64String): 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: Id64String): 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 IModelDb The source IModelDb.  
targetDb IModelDb The target IModelDb.  

Defined in

Last Updated: 01 December, 2021