Contenuto principale

safetyAnalysisMgr.getCurrentDocument

R2026b

Get selected document in Safety Analysis Manager

Since R2026b

Description

doc = safetyAnalysisMgr.getCurrentDocument returns the selected document in the Safety Analysis Manager.

example

Examples

collapse all

Suppose you have two new documents open in the Safety Analysis Manager, one fault tree document and one spreadsheet. Select the fault tree document in the Safety Analysis Manager. Retrieve the FaultTreeDocument object.

myTreeDoc = safetyAnalysisMgr.getCurrentDocument
myTreeDoc = 

  FaultTreeDocument with properties:

       FaultTrees: [1×1 safetyAnalysisMgr.FaultTree]
           Events: [1×0 safetyAnalysisMgr.Event]
    FailureModels: [1×0 safetyAnalysisMgr.FailureModel]
            Gates: [1×1 safetyAnalysisMgr.Gate]
       EvalConfig: [1×1 safetyAnalysisMgr.EvalConfig]
         FileName: ''
      Description: ''

To retrieve the Spreadsheet object, select the spreadsheet in the Safety Analysis Manager and rerun the function.

Output Arguments

collapse all

Selected document in the Safety Analysis Manager, returned as a Spreadsheet or FaultTreeDocument object.

Version History

Introduced in R2026b