MLightCAD
    Preparing search index...
    • Tracks the active CAD document and its open lifecycle for UI consumers.

      This composable centralizes reactive document metadata from AcApDocManager and AcApDocument, including:

      • Current or pending document open mode
      • Whether a document open operation is in progress
      • Current document file name and display title

      Behavior:

      • Initializes from the currently active document once the viewer exists
      • Retries binding after mount when the viewer has not been created yet
      • Updates openMode as soon as documentToBeOpened fires
      • Synchronizes fileName, docTitle, and openMode when documentActivated fires
      • Clears the opening state when failed-to-open-file is emitted
      • Records lastOpenErrorCode from structured open failures

      Returns UseDocumentReturn

      Shared reactive document state and manual open-state helpers