Configuration options for database converters.

This interface defines the configuration parameters that can be passed to database converters to customize their behavior during the conversion process.

interface AcDbDatabaseConverterConfig {
    convertByEntityType?: boolean;
    parserWorkerUrl?: string;
    useWorker?: boolean;
}

Properties

convertByEntityType?: boolean

Whether to convert entities grouped by type.

When set to true, the converter will process entities one type at a time (e.g., all lines, then all circles, then all polylines), which can help optimize rendering performance or simplify debugging by handling each entity type in isolation.

When set to false, entities are converted in the order they appear in the source file.

false
const config: AcDbDatabaseConverterConfig = {
convertByEntityType: true
};
parserWorkerUrl?: string

Optional URL for web worker scripts used in the conversion process.

When provided, this URL points to a web worker script that can be used for offloading computationally intensive parsing tasks to a background thread, improving performance and preventing UI blocking.

const config: AcDbDatabaseConverterConfig = {
parserWorkerUrl: '/assets/dxf-parser-worker.js'
};
useWorker?: boolean

Whether to use web workers for computationally intensive tasks.

When set to true, the converter will attempt to use web workers for computationally intensive tasks, which can improve performance by offloading work to background threads and preventing UI blocking.

When set to false, all computationally intensive operations will be performed on the main thread.

false
const config: AcDbDatabaseConverterConfig = {
useWorker: true,
parserWorkerUrl: '/assets/dxf-parser-worker.js'
};