Database converter for DWG files based on libredwg-web.

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

  • 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