IModelElementCloneContext Class
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): IModelElementCloneContext | Construct a new IModelElementCloneContext. | |
dispose(): void | Dispose any native resources associated with this IModelElementCloneContext. | |
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. | |
initialize(): Promise<void> | perform necessary initialization to use a clone context, namely caching the reference types in the source's schemas | |
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. | |
create(...args: [sourceDb, targetDb]): Promise<IModelElementCloneContext> Static | construct and initialize an IModelElementCloneContext at once, for where you construct in an async context |
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: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.