主要内容

FaultTree

R2026b

Fault tree in fault tree document

Since R2026b

Description

FaultTree objects represent fault trees in Safety Analysis Manager fault tree documents. Use FaultTree objects to access gates and transfer gates in a fault tree.

Creation

To create a FaultTree object:

  • Use the createFaultTree function on a FaultTreeDocument object.

  • Get the FaultTrees property of a FaultTreeDocument object.

Properties

expand all

This property is read-only.

Gates in the fault tree, represented as an array of Gate objects. The first element of the array is the top-level gate of the fault tree.

This property is read-only.

Transfer gates in the fault tree, represented as an array of TransferGate objects.

Object Functions

deleteSubtreeDelete subtree in fault tree document
deleteTransferGateDelete transfer gate from fault tree
exportToPDFExport fault trees and fault tree documents to PDF

Examples

collapse all

Create a fault tree document.

myTreeDoc = safetyAnalysisMgr.newDocument("fault-tree");

Add a fault tree to the fault tree document by using the createFaultTree function.

createFaultTree(myTreeDoc);

Create a fault tree document.

myTreeDoc = safetyAnalysisMgr.newDocument("fault-tree");

The new document contains one fault tree. Retrieve the FaultTree object from the document.

myFaultTree = myTreeDoc.FaultTree;

The fault tree contains one top-level gate. Retrieve the Gate object for the top level gate.

topGate = myFaultTree.Gates;

Add three events to the top-level gate.

createEvent(topGate);
createEvent(topGate);
createEvent(topGate);

Version History

Introduced in R2026b