MLightCAD
    Preparing search index...

    Captures thumbnail images for block definitions.

    Prefers the stored AcDbBlockTableRecord.previewIcon (DXF/DWG group 310). When absent — common for DXF exports without PreviewIcon — falls back to an off-scene draw of the block definition via AcDbRenderingCache, matching AutoCAD's gallery behavior for blocks that have no embedded icon.

    Thumbnails are cached per document + block-table-record object id. The cache is cleared on document activation. Callers that need fresh thumbnails after an in-place block edit (same object id) should call clearCache before capturing again.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Returns a data URL thumbnail for the named block definition.

      Parameters

      • blockName: string

        Block table record name

      • size: number = DEFAULT_PREVIEW_SIZE

        Long side of the square output in pixels (default 64)

      Returns string | undefined

      PNG/BMP data URL, or undefined when capture fails