主要内容

safetyAnalysisMgr.openDocument

R2026b

Open Safety Analysis Manager document

Since R2023b

Description

doc = safetyAnalysisMgr.openDocument(fileName) opens the Safety Analysis Manager document file, fileName. This function does not open the Safety Analysis Manager.

example

Examples

collapse all

Suppose you have a Safety Analysis Manager spreadsheet document named mySpreadsheet.mldatx that contains two rows and two columns. Open the spreadsheet.

document = safetyAnalysisMgr.openDocument("mySpreadsheet.mldatx")
document = 

  Spreadsheet with properties:

    FileName: 'mySpreadsheet.mldatx'
        Rows: 2
     Columns: 2
 Description: ''

Since R2026b

Suppose you have a Safety Analysis Manager spreadsheet document named myFaultTreeDoc.mldatx that contains one fault tree. The fault tree has a top level gate and two events. Open the fault tree document.

document = safetyAnalysisMgr.openDocument("myFaultTreeDoc.mldatx")
document = 

  FaultTreeDocument with properties:

       FaultTrees: [1×1 safetyAnalysisMgr.FaultTree]
           Events: [1×2 safetyAnalysisMgr.Event]
    FailureModels: [1×2 safetyAnalysisMgr.FailureModel]
            Gates: [1×1 safetyAnalysisMgr.Gate]
       EvalConfig: [1×1 safetyAnalysisMgr.EvalConfig]
         FileName: 'C:\myFaultTreeDoc.mldatx'
      Description: ''

Input Arguments

collapse all

File name to open, specified as a string scalar or character vector. The file must be a Safety Analysis Manager document file. When specifying the file name, you must include the .mldatx extension. If the file is not in the current folder, specify the path and the file name. The file must be on the MATLAB® search path.

Data Types: char | string

Output Arguments

collapse all

Opened document, returned as a Spreadsheet or FaultTreeDocument object.

Version History

Introduced in R2023b

expand all