CLASS
ArdkRecordingExporter
public final class ArdkRecordingExporter: ArdkSession.IDisposable
A session for exporting scan recordings to various formats.
ArdkRecordingExporter provides capabilities for converting saved scan data
into recorderV2 format for use in Unity Playback or activating VPS.
Methods
export(scanDirPath:scanId:userData:exportAsVideo:pollingInterval:timeout:progressCallback:)
public func export(
scanDirPath: String,
scanId: String,
userData: [String: Any] = [:],
exportAsVideo: Bool = true,
pollingInterval: TimeInterval = 0.1,
timeout: TimeInterval = 300.0,
progressCallback: ((Float) -> Void)? = nil
) async throws -> String
Exports a scan recording asynchronously.
Starts the export process for a scan recording and suspends until the export completes successfully, fails, or times out.
- Parameters:
- scanPath: The path to the directory containing the raw scan files to export. This
is obtained from the return value of
ArdkScanningSession/saveInfo(). The export will be written to a .tgz file inside this directory. - scanId: The unique identifier of the scan to export.
- userData: Dictionary containing custom metadata to include in the export
- exportAsVideo: If true, the RGB frames in the scan will be exported as an .mp4 video. If false, they will be individual image files.
- pollingInterval: Time between progress checks (default: 0.5s).
- timeout: Maximum duration to wait before failing (default: 5 minutes).
- scanPath: The path to the directory containing the raw scan files to export. This
is obtained from the return value of
- Returns: The file path to the exported recording.
- Throws:
CancellationErrorif the Task running this function was cancelled.TimeoutErrorif the function timed out before it could complete execution.MeshDownloaderResults.Errorif there was an error specific to the VPS Coverage query.
Parameters
| Name | Description |
|---|---|
| scanPath | The path to the directory containing the raw scan files to export. This is obtained from the return value ofArdkScanningSession/saveInfo(). The export will be written to a .tgz file inside this directory. |
| scanId | The unique identifier of the scan to export. |
| userData | Dictionary containing custom metadata to include in the export |
| exportAsVideo | If true, the RGB frames in the scan will be exported as an .mp4 video. If false, they will be individual image files. |
| pollingInterval | Time between progress checks (default: 0.5s). |
| timeout | Maximum duration to wait before failing (default: 5 minutes). |