MLightCAD
    Preparing search index...
    • Reads the layout background colour from the database for the given space.

      Looks up MODELBKCOLOR or PAPERBKCOLOR (via layoutBackgroundSysVar) through AcDbSysVarManager, then converts the AcCmColor result to a packed RGB value with canvasBackgroundFromColor.

      Parameters

      • database: AcDbDatabase

        Drawing database whose sysvars are read.

      • isModelSpace: boolean

        true to read model-space background; false to read paper-space background.

      Returns number

      Packed 24-bit RGB canvas background colour.

      const bg = readLayoutBackgroundColor(database, true)
      renderer.setClearColor(bg)

      AcTrView2d.syncDisplaySysVars — applies this on document open