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.

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

    Hierarchy

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

    Properties

    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
    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.