Database regenerator.

This class extends AcDbDatabaseConverter so that it can leverage the existing logic to open one database such as progress notification. However, it doesn't really do any conversion tasks and just pass one database instance and it.

Hierarchy (View Summary)

Constructors

Properties

Configuration for the converter

Optional progress callback for tracking conversion progress

Methods

  • Resolves the parser worker timeout in milliseconds.

    Explicit timeout always takes precedence. Otherwise the timeout scales linearly with file size at one extra second per MiB, clamped to the range of 30 seconds to 2 minutes.

    Parameters

    • data: ArrayBuffer
    • Optionaltimeout: number

    Returns number

  • Processes entities in batches to maintain UI responsiveness.

    This method breaks up the entity processing work into smaller chunks that are executed asynchronously. This is often referred to as "batch processing" or "cooperative multitasking," where the time-consuming task is broken into smaller pieces and executed in small intervals to allow the UI to remain responsive.

    Parameters

    • source: AcDbDatabase

      Source database

    • target: AcDbDatabase

      Target database

    • minimumChunkSize: number

      Minimum number of entities to process in each chunk

    • startPercentage: { value: number }

      Object containing the starting percentage for progress tracking

    • Optionalprogress: AcDbConversionProgressCallback

      Optional callback for progress updates

    Returns Promise<void>

  • Reads and converts data into an AcDbDatabase.

    This method orchestrates the entire conversion process, including parsing, processing various components (fonts, linetypes, styles, etc.), and building the final database.

    Parameters

    • data: ArrayBuffer

      The input data to convert

    • db: AcDbDatabase

      The database to populate with converted data

    • minimumChunkSize: number

      Minimum chunk size for batch processing

    • Optionalprogress: AcDbConversionProgressCallback

      Optional progress callback

    • Optionaltimeout: number

    Returns Promise<void>

    Promise that resolves when conversion is complete