主要内容

FaultTreeDocument

R2026b

Fault tree document in Safety Analysis Manager

Since R2026b

Description

FaultTreeDocument objects represent fault tree documents in the Safety Analysis Manager. Use FaultTreeDocument objects to manage fault trees and their artifacts, such as events, gates, and failure models. After evaluating FaultTreeDocument objects, you can retrieve the evaluation results.

Creation

To create a FaultTreeDocument object:

Properties

expand all

This property is read-only.

Fault trees in the fault tree document, represented as an array of FaultTree objects. Each fault tree document can contain multiple fault trees. To add a fault tree to the document, use the createFaultTree function.

This property is read-only.

Events in the fault tree document, represented as an array of Event objects. To add an event to the fault tree document, retrieve a Gate object from the tree and use the createEvent function.

This property is read-only.

Failure models in the fault tree document, represented as an array of FailureModel objects. Each fault tree document can contain multiple failure models, and events in the fault tree can share failure models. To add a new failure model to the document, use the createFailureModel function.

This property is read-only.

Gates in the fault tree document, represented as an array of Gate objects. Within each fault tree, each gate must have a unique label. To add a gate to the fault tree document, retrieve a Gate object from the tree and use the createGate function.

Evaluation configuration of the fault tree document, specified as an EvalConfig object.

This property is read-only.

File name of the fault tree document, represented as a character vector.

Data Types: char

Description of the fault tree document, specified as a string scalar or character vector.

Data Types: string | char

Object Functions

acceptAllChangesAccept detected changes to linked artifacts in Safety Analysis Manager
addCallbackAdd custom callback to Safety Analysis Manager spreadsheets
addDocumentAttributeAdd document attribute to spreadsheet in Safety Analysis Manager
clearFlagsClear flags in Safety Analysis Manager spreadsheet and fault tree document elements
closeClose document in Safety Analysis Manager
convertGateToTreeConvert fault tree gates and inputs into fault trees
createEventAdd event to fault tree document or gate
createFailureModelCreate failure model in fault tree document
createFaultTreeCreate fault tree in fault tree document
deleteCallbackDelete custom callback from Safety Analysis Manager documents
deleteDocumentAttributeDelete document attributes in spreadsheet in Safety Analysis Manager
deleteEventDelete event from a fault tree document
deleteFailureModelDelete failure model from fault tree document
deleteFaultTreeDelete fault tree from fault tree document
deleteSubtreeDelete subtree in fault tree document
detectChangesDetect changes to linked artifacts in Safety Analysis Manager document
enableCallbackEnable or disable callbacks in Safety Analysis Manager spreadsheets
evaluateEvaluate failure parameters and cutsets of fault trees
exportToPDFExport fault trees and fault tree documents to PDF
getCallbackRetrieve spreadsheet callback code in Safety Analysis Manager
getChangesGet changed artifacts linked to artifacts in Safety Analysis Manager
getCustomCallbackNamesRetrieve names of custom callbacks in Safety Analysis Manager documents
getDocumentAttributeRetrieve document attribute values in Safety Analysis Manager documents
getDocumentAttributePropertiesRetrieve document attribute properties in Safety Analysis Manager document
getEventRetrieve event with specified label from fault tree document
getFailureModelRetrieve failure model with specified label from fault tree document
getFlagsRetrieve flags from Safety Analysis Manager documents
getGateRetrieve gate with specified label from fault tree document
isCallbackEnabledDetermine whether custom callbacks are enabled
refreshLinks(Removed) Refresh link resolved status in Safety Analysis Manager documents
renameCallbackRename custom callbacks in Safety Analysis Manager spreadsheets
renameDocumentAttributeRename document attributes in Safety Analysis Manager documents
runAnalysisExecute callback script on Safety Analysis Manager document
saveSave Safety Analysis Manager document
saveTemplateSave Safety Analysis Manager document as a template
setCallbackAssign code to Safety Analysis Manager document callback
setDocumentAttributeSet document attributes in Safety Analysis Manager documents

Examples

collapse all

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