exportPartGraphicsAsync Method
Exports meshes suitable for graphics APIs from a specified GeometryPart in this IModelDb. The expected use case is to call IModelDb.exportGraphicsAsync and supply the optional partInstanceArray argument, then call this function for each unique GeometryPart from that list. Each export queues a task to the thread pool, allowing multiple parts to be exported in parallel and without blocking the main thread. The onPartGraphics and onPartLineGraphics callbacks are invoked in the main thread.
- The results of changing ExportPartGraphicsOptions during the ExportPartGraphicsOptions.onPartGraphics callback are not defined.
- See export-gltf under test-apps in the iTwin.js monorepo for a working reference.
exportPartGraphicsAsync(exportProps: ExportPartGraphicsOptions): Promise<void>
@returns A Promise that resolves when the export is complete, or rejects in the case of an error.
| Parameter | Type | Description |
|---|---|---|
| exportProps | ExportPartGraphicsOptions |
Returns - Promise
A Promise that resolves when the export is complete, or rejects in the case of an error.
Defined in
- core/backend/src/IModelDb.ts Line 1970
Last Updated: 07 February, 2026