IModelCloneContext Class
Beta
The context for transforming a source Element to a target Element and remapping internal identifiers to the target iModel.
Extends
Methods
Name | Description | |
---|---|---|
constructor(sourceDb: IModelDb, targetDb?: IModelDb): IModelCloneContext | Construct a new IModelElementCloneContext. | |
findTargetAspectId(sourceAspectId: string): string | Look up a target AspectId from the source AspectId. | |
findTargetEntityId(sourceEntityId: | | | ): | | | | Look up a target EntityReference from a source EntityReference | |
initialize(): Promise<void> | perform necessary initialization to use a clone context, namely caching the reference types in the source's schemas | |
loadStateFromDb(db: SQLiteDb): void | ||
remapElementAspect(aspectSourceId: string, aspectTargetId: string): void | Add a rule that remaps the specified source ElementAspect to the specified target ElementAspect. | |
removeElementAspect(aspectSourceId: string): void | Remove a rule that remaps the specified source ElementAspect | |
saveStateToDb(db: SQLiteDb): void |
Inherited methods
Name | Inherited from | Description |
---|---|---|
dispose(): void | IModelElementCloneContext | Dispose any native resources associated with this IModelElementCloneContext. |
filterSubCategory(sourceSubCategoryId: string): void | IModelElementCloneContext | Filter out geometry entries in the specified SubCategory from GeometryStreams in the target iModel. |
findTargetCodeSpecId(sourceId: string): string | IModelElementCloneContext | Look up a target CodeSpecId from the source CodeSpecId. |
findTargetElementId(sourceElementId: string): string | IModelElementCloneContext | Look up a target ElementId from the source ElementId. |
isSubCategoryFiltered(subCategoryId: string): boolean | IModelElementCloneContext | Returns true if this SubCategory is being filtered. |
remapCodeSpec(sourceCodeSpecName: string, targetCodeSpecName: string): void | IModelElementCloneContext | Add a rule that remaps the specified source CodeSpec to the specified target CodeSpec. |
remapElement(sourceId: string, targetId: string): void | IModelElementCloneContext | Add a rule that remaps the specified source Element to the specified target Element. |
remapElementClass(sourceClassFullName: string, targetClassFullName: string): void | IModelElementCloneContext | Add a rule that remaps the specified source class to the specified target class. |
removeElement(sourceId: string): void | IModelElementCloneContext | Remove a rule that remaps the specified source Element. |
create(...args: [sourceDb, targetDb]): Promise<IModelElementCloneContext> Static | IModelElementCloneContext | construct and initialize an IModelElementCloneContext at once, for where you construct in an async context |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
hasSubCategoryFilter Accessor ReadOnly | boolean | IModelElementCloneContext | Returns true if there are any SubCategories being filtered. |
isBetweenIModels Accessor ReadOnly | boolean | IModelElementCloneContext | Returns true if this context is for transforming between 2 iModels and false if it for transforming within the same iModel. |
sourceDb Readonly | IModelDb | IModelElementCloneContext | The source IModelDb. |
targetDb Readonly | IModelDb | IModelElementCloneContext | The target IModelDb. |
Defined in
Last Updated: 20 June, 2023