MLightCAD
    Preparing search index...

    Options for opening a CAD database.

    This interface extends the base options from the data model but replaces the readOnly property with a mode property that provides more granular access control.

    Inherits AcDbOpenDatabaseOptions.drawNoPlotLayers from the data model. AcApDocManager defaults it to false (web viewer semantics) when omitted.

    const options: AcApOpenDatabaseOptions = {
    mode: AcEdOpenMode.Write,
    fontLoader: myFontLoader
    };
    interface AcApOpenDatabaseOptions {
        drawNoPlotLayers?: boolean;
        fontLoader?: AcDbFontLoader;
        minimumChunkSize?: number;
        mode?: AcEdOpenMode;
        progressiveRendering?: boolean;
        sysVars?: Record<string, string | number | boolean>;
        timeout?: number;
    }

    Hierarchy

    • Omit<AcDbOpenDatabaseOptions, "readOnly">
      • AcApOpenDatabaseOptions
    Index

    Properties

    drawNoPlotLayers?: boolean

    Whether entities on non-plottable ("no-plot") layers are drawn.

    • true (default): desktop AutoCAD editor semantics — no-plot layers remain visible on screen (Defpoints, viewport frames on *-NPLT, etc.).
    • false: web/publish viewer semantics (e.g. BIM 360 / ACC) — entities on no-plot layers are omitted from display.
    fontLoader?: AcDbFontLoader

    Loader used to load fonts used in the drawing database.

    This loader will be used to load any fonts referenced by text entities in the drawing database.

    minimumChunkSize?: number

    The minimum number of items in one chunk.

    If this value is greater than the total number of entities in the drawing database, the total number is used. This controls how the database processing is broken into chunks for better performance.

    The access mode for opening the database. Higher value modes are compatible with lower value modes.

    • Read (0): Read-only access
    • Review (4): Review access, compatible with Read
    • Write (8): Full read/write access, compatible with Review and Read
    progressiveRendering?: boolean

    Whether to render entities incrementally while a drawing is opening.

    When true, entity conversion is deferred across event-loop turns so geometry appears progressively and the camera can reframe as batches land. When false (default), conversion still runs asynchronously but the canvas is not redrawn until every entity is converted; zoom-to-fit also waits for conversion to finish.

    sysVars?: Record<string, string | number | boolean>

    System variables to override in the database.

    This allows overriding system variable values when opening a database. For example, to disable line weight display regardless of the database's stored value, set { 'lwdisplay': false }.

    The keys are system variable names (case-insensitive), and values can be number, boolean, or string types.

    timeout?: number

    Timeout for web worker parsing in milliseconds.

    This option is used only when the selected converter parses the drawing file in a web worker. If omitted, the converter-level timeout is used.