TemplateModelCloner Class @beta
IModelTransformer that clones the contents of a template model.
Extends
Methods
| Name | Description | |
|---|---|---|
| constructor(editTxn: EditTxn): TemplateModelCloner | Construct a new TemplateModelCloner | |
| onTransformElement(sourceElement: Element): Promise<ElementProps> | Cloning from a template requires this override of onTransformElement. | |
| placeTemplate2d(sourceTemplateModelId: string, targetModelId: string, placement: Placement2d): Promise<Map<string, string>> | Place a template from the sourceDb at the specified placement in the target model within the targetDb. | |
| placeTemplate3d(sourceTemplateModelId: string, targetModelId: string, placement: Placement3d): Promise<Map<string, string>> | Place a template from the sourceDb at the specified placement in the target model within the targetDb. |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| addCustomChanges(_sourceDbChanges: ChangedInstanceIds): Promise<void> Protected Inherited | IModelTransformer | This will be called when transformer is called with argsForProcessChanges to process changes. |
| calculateEcefTransform(): Transform | undefined Inherited | IModelTransformer | Calculate the transform between two ECEF locations |
| calculateTransformFromHelmertTransforms(): Transform | undefined Inherited | IModelTransformer | |
| combineElements(sourceElementIds: Id64Array, targetElementId: string): void Inherited | IModelTransformer | Combine an array of source elements into a single target element. |
| completePartiallyCommittedAspects(): Promise<void> Protected Inherited | IModelTransformer | |
| completePartiallyCommittedElements(): Promise<void> Protected Inherited | IModelTransformer | |
| dispose(): void Inherited | IModelTransformer | Dispose any native resources associated with this IModelTransformer. |
| getIsForwardSynchronization(): Promise<boolean> Inherited | IModelTransformer | Get whether this is a forward synchronization. |
| getIsReverseSynchronization(): Promise<boolean> Inherited | IModelTransformer | Get whether this is a reverse synchronization. |
| getProvenanceDb(): Promise<IModelDb> Inherited | IModelTransformer | Get the IModelDb where provenance (ExternalSourceAspects) is stored. |
| getSynchronizationVersion(): Promise<ChangesetIndexAndId> Protected Inherited | IModelTransformer | the changeset in the scoping element's source version found for this transformation |
| hasElementChanged(sourceElement: Element): boolean Protected Inherited | IModelTransformer | Returns true if a change within sourceElement is detected. |
| initElementProvenance(sourceElementId: string, targetElementId: string): Promise<ExternalSourceAspectProps> Inherited | IModelTransformer | Create an ExternalSourceAspectProps in a standard way for an Element in an iModel --> iModel transformation. |
| initialize(): Promise<void> Inherited | IModelTransformer | Initialize prerequisites of processing, you must initialize with an InitOptions if you |
| initScopeProvenance(): Promise<void> Protected Inherited | IModelTransformer | Make sure there are no conflicting other scope-type external source aspects on the target scope element, |
| onDeleteElement(sourceElementId: string): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onDeleteElement that is called when IModelExporter detects that an Element has been deleted from the source iModel. |
| onDeleteModel(sourceModelId: string): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onDeleteModel that is called when IModelExporter detects that a Model has been deleted from the source iModel. |
| onDeleteRelationship(sourceRelInstanceId: string): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onDeleteRelationship that is called when IModelExporter detects that a Relationship has been deleted from the source iModel. |
| onExportCodeSpec(sourceCodeSpec: CodeSpec): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportCodeSpec that imports a CodeSpec into the target iModel when it is exported from the source iModel. |
| onExportElement(sourceElement: Element): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportElement that imports an element into the target iModel when it is exported from the source iModel. |
| onExportElementMultiAspects(sourceAspects: ElementMultiAspect[]): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportElementMultiAspects that imports ElementMultiAspects into the target iModel when they are exported from the source iModel. |
| onExportElementUniqueAspect(sourceAspect: ElementUniqueAspect): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportElementUniqueAspect that imports an ElementUniqueAspect into the target iModel when it is exported from the source iModel. |
| onExportFont(font: FontProps, _isUpdate: boolean): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportFont that imports a font into the target iModel when it is exported from the source iModel. |
| onExportModel(sourceModel: Model): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportModel that is called when a Model should be exported from the source iModel. |
| onExportRelationship(sourceRelationship: Relationship): Promise<void> Inherited | IModelTransformer | Override of IModelExportHandler.onExportRelationship that imports a relationship into the target iModel when it is exported from the source iModel. |
| onExportSchema(schema: Schema): Promise<void | ExportSchemaResult> Inherited | IModelTransformer | Override of IModelExportHandler.onExportSchema that serializes a schema to disk for processSchemas to import into |
| onProgress(): Promise<void> Inherited | IModelTransformer | This method is called when IModelExporter has made incremental progress based on the progressInterval setting. |
| onSkipElement(_elementId: string): Promise<void> Inherited | IModelTransformer | Called when element is skipped instead of exported. |
| onTransformElementAspect(sourceElementAspect: ElementAspect): Promise<ElementAspectProps> Protected Inherited | IModelTransformer | Transform the specified sourceElementAspect into ElementAspectProps for the target iModel. |
| onTransformModel(sourceModel: Model, targetModeledElementId: string): ModelProps Inherited | IModelTransformer | Transform the specified sourceModel into ModelProps for the target iModel. |
| onTransformRelationship(sourceRelationship: Relationship): RelationshipProps Protected Inherited | IModelTransformer | Transform the specified sourceRelationship into RelationshipProps for the target iModel. |
| process(): Promise<void> Inherited | IModelTransformer | The behavior of process is influenced by argsForProcessChanges being defined or not defined during construction passed of the IModelTransformer. |
| processChildElements(sourceElementId: string): Promise<void> Inherited | IModelTransformer | Import child elements into the target IModelDb |
| processCodeSpec(codeSpecName: string): Promise<void> Inherited | IModelTransformer | Cause a single CodeSpec to be exported from the source iModel and imported into the target iModel. |
| processCodeSpecs(): Promise<void> Inherited | IModelTransformer | Cause all CodeSpecs to be exported from the source iModel and imported into the target iModel. |
| processElement(sourceElementId: string): Promise<void> Inherited | IModelTransformer | Cause the specified Element and its child Elements (if applicable) to be exported from the source iModel and imported into the target iModel. |
| processFonts(): Promise<void> Inherited | IModelTransformer | Cause all fonts to be exported from the source iModel and imported into the target iModel. |
| processModel(sourceModeledElementId: string): Promise<void> Inherited | IModelTransformer | Cause the model container, contents, and sub-models to be exported from the source iModel and imported into the target iModel. |
| processModelContents(sourceModelId: string, targetModelId: string, elementClassFullName: string = Element.classFullName): Promise<void> Inherited | IModelTransformer | Cause the model contents to be exported from the source iModel and imported into the target iModel. |
| processRelationships(baseRelClassFullName: string): Promise<void> Inherited | IModelTransformer | Imports all relationships that subclass from the specified base class. |
| processSchemas(): Promise<void> Inherited | IModelTransformer | Cause all schemas to be exported from the source iModel and imported into the target iModel. |
| processSubject(sourceSubjectId: string, targetSubjectId: string): Promise<void> Inherited | IModelTransformer | Recursively import all Elements and sub-Models that descend from the specified Subject |
| shouldDetectDeletes(): Promise<boolean> Protected Inherited | IModelTransformer | Returns true if brute force delete detections should be run. |
| shouldExportCodeSpec(_sourceCodeSpec: CodeSpec): Promise<boolean> Inherited | IModelTransformer | Override of IModelExportHandler.shouldExportCodeSpec that is called to determine if a CodeSpec should be exported from the source iModel. |
| shouldExportElement(_sourceElement: Element): Promise<boolean> Inherited | IModelTransformer | Override of IModelExportHandler.shouldExportElement that is called to determine if an element should be exported from the source iModel. |
| shouldExportElementAspect(aspect: ElementAspect): Promise<boolean> Inherited | IModelTransformer | If true is returned, then the ElementAspect will be exported. |
| shouldExportRelationship(_sourceRelationship: Relationship): Promise<boolean> Inherited | IModelTransformer | Override of IModelExportHandler.shouldExportRelationship that is called to determine if a Relationship should be exported. |
| shouldExportSchema(schemaKey: SchemaKey): Promise<boolean> Inherited | IModelTransformer | Override of IModelExportHandler.shouldExportSchema that is called to determine if a schema should be exported |
| tryGetProvenanceScopeAspect(): Promise<ExternalSourceAspect | undefined> Protected Inherited | IModelTransformer | |
| updateSynchronizationVersion(__namedParameters: { initializeReverseSyncVersion?: boolean } = {}): Promise<void> Inherited | IModelTransformer | Updates the synchronization version on the scope ESA. |
| convertHelmertToTransform(helmert: Helmert2DWithZOffset): Transform Static Inherited | IModelTransformer |
Inherited properties
| Name | Type | Inherited from | Description |
|---|---|---|---|
| _elementsWithExplicitlyTrackedProvenance Protected Inherited | Set<string> | IModelTransformer | a set of elements for which source provenance will be explicitly tracked by ExternalSourceAspects |
| _partiallyCommittedAspectIds Protected Inherited | Id64Set | IModelTransformer | |
| _partiallyCommittedElementIds Protected Inherited | Id64Set | IModelTransformer | |
| _provenanceManager Protected Inherited | IModelTransformer | ||
| _schemaExportDir Protected Inherited | string | IModelTransformer | The directory where schemas will be exported, a random temporary directory |
| _sourceEditTxn Protected Readonly Inherited | EditTxn | undefined | IModelTransformer | The optional EditTxn used for write operations on the source iModel during reverse synchronization. |
| _targetEditTxn Protected Readonly Inherited | EditTxn | IModelTransformer | The EditTxn used for write operations on the target iModel. |
| context Readonly Inherited | IModelCloneContext | IModelTransformer | The IModelTransformContext for this IModelTransformer. |
| exporter Readonly Inherited | IModelExporter | IModelTransformer | The IModelExporter that will export from the source iModel. |
| importer Readonly Inherited | IModelImporter | IModelTransformer | The IModelImporter that will import into the target iModel. |
| provenanceElementAspectClasses Accessor Static Inherited ReadOnly | Entity[] | IModelTransformer | The element aspect classes that are considered to define provenance in the iModel |
| provenanceElementClasses Accessor Static Inherited ReadOnly | Entity[] | IModelTransformer | The element classes that are considered to define provenance in the iModel |
| sourceDb Readonly Inherited | IModelDb | IModelTransformer | The normally read-only source iModel. |
| targetDb Readonly Inherited | IModelDb | IModelTransformer | The read/write target iModel. |
| targetScopeElementId Accessor Inherited ReadOnly | string | IModelTransformer | The Id of the Element in the target iModel that represents the source repository as a whole and scopes its ExternalSourceAspect instances. |
Defined in
Last Updated: 03 August, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.