onExportSchema Method

Override of IModelExportHandler.onExportSchema that serializes a schema to disk for processSchemas to import into the target iModel when it is exported from the source iModel.

onExportSchema(schema: Schema): Promise<void | ExportSchemaResult>

@returns Although the type is possibly void for backwards compatibility of subclasses, IModelTransformer.onExportSchema always returns anExportSchemaResult with a defined schemaPath property, for subclasses to know where the schema was written. Schemas are not guaranteed to be written to _schemaExportDir by a known pattern derivable from the schema's name, so you must use this to find it.

Parameter Type Description
schema Schema  

Returns - Promise<void | ExportSchemaResult>

Although the type is possibly void for backwards compatibility of subclasses, IModelTransformer.onExportSchema always returns anExportSchemaResult with a defined schemaPath property, for subclasses to know where the schema was written. Schemas are not guaranteed to be written to _schemaExportDir by a known pattern derivable from the schema's name, so you must use this to find it.

Defined in

Last Updated: 06 November, 2024