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.  
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.  
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.  

Properties

Name Type Description
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: 08 January, 2020