IModelExporter Class
Base class for exporting data from an iModel.
@note Most uses cases will not require a custom subclass of IModelExporter
. Instead, it is more typical to subclass/customize IModelExportHandler.
@see iModel Transformation and Data Exchange, registerHandler, IModelTransformer, IModelImporter
Methods
Name | Description | |
---|---|---|
constructor(sourceDb: IModelDb, elementAspectsStrategy: (source: IModelDb, handler: ) => ExportElementAspectsWithElementsStrategy): IModelExporter | Construct a new IModelExporter | |
excludeCodeSpec(codeSpecName: string): void | Add a rule to exclude a CodeSpec | |
excludeElement(elementId: string): void | Add a rule to exclude a specific Element. | |
excludeElementAspectClass(classFullName: string): void | Add a rule to exclude all ElementAspects of a specified class. | |
excludeElementClass(classFullName: string): void | Add a rule to exclude all Elements of a specified class. | |
excludeElementsInCategory(categoryId: string): void | Add a rule to exclude all Elements in a specified Category. | |
excludeRelationshipClass(classFullName: string): void | Add a rule to exclude all Relationships of a specified class. | |
exportAll(): Promise<void> | Export all entity instance types from the source iModel. | |
exportChanges(args?: ExportChangesOptions): Promise<void> | Export changes from the source iModel. | |
exportChildElements(elementId: string): Promise<void> | Export the child elements of the specified element from the source iModel. | |
exportCodeSpecById(codeSpecId: string): Promise<void> | Export a single CodeSpec from the source iModel. | |
exportCodeSpecByName(codeSpecName: string): Promise<void> | Export a single CodeSpec from the source iModel. | |
exportCodeSpecs(): Promise<void> | Export all CodeSpecs from the source iModel. | |
exportElement(elementId: string): Promise<void> | Export the specified element, its child elements (if applicable), and any owned ElementAspects. | |
exportFontByName(fontName: string): Promise<void> | Export a single font from the source iModel. | |
exportFontByNumber(fontNumber: number): Promise<void> | Export a single font from the source iModel. | |
exportFonts(): Promise<void> | Export all fonts from the source iModel. | |
exportModel(modeledElementId: string): Promise<void> | Export the model container, contents, and sub-models from the source iModel. | |
exportModelContents(modelId: string, elementClassFullName: stringElement.classFullName, skipRootSubject?: boolean): Promise<void> | Export the model contents. | |
exportRelationship(relClassFullName: string, relInstanceId: string): Promise<void> | Export a relationship from the source iModel. | |
exportRelationships(baseRelClassFullName: string): Promise<void> | Exports all relationships that subclass from the specified base class. | |
exportSchemas(): Promise<void> | Export schemas from the source iModel. | |
exportSubModels(parentModelId: string): Promise<void> | Export the sub-models directly below the specified model. | |
initialize(options: ExportChangesOptions): Promise<void> | Initialize prerequisites of exporting. | |
registerHandler(handler: IModelExportHandler): void | Register the handler that will be called by IModelExporter. | |
shouldExportElement(element: Element): boolean | Returns true if the specified element should be exported. |
Properties
Name | Type | Description | |
---|---|---|---|
handler Accessor Protected ReadOnly | IModelExportHandler | The handler called by this IModelExporter. | |
progressInterval | number | The number of entities exported before incremental progress should be reported via the onProgress callback. | |
sourceDb Readonly | IModelDb | The read-only source iModel. | |
sourceDbChanges Accessor ReadOnly | undefined | ChangedInstanceIds | Retrieve the cached entity change information. | |
visitElements | boolean | A flag that determines whether this IModelExporter should visit Elements or not. | |
visitRelationships | boolean | A flag that determines whether this IModelExporter should visit Relationships or not. | |
wantGeometry | boolean | A flag that indicates whether element GeometryStreams are loaded or not. | |
wantSystemSchemas | boolean | A flag that indicates whether system schemas should be exported or not. | |
wantTemplateModels | boolean | A flag that indicates whether template models should be exported or not. |
Defined in
Last Updated: 06 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.