Contenido principal

deleteEvent

R2026b

Delete event from a fault tree document

Since R2026b

Description

deleteEvent(faultTreeDocument,eventLabel) deletes the event that has the label eventLabel from the Safety Analysis Manager fault tree document, faultTreeDocument. The function deletes all the instances of the event in the fault tree document.

example

Examples

collapse all

Create a new fault tree document in the Safety Analysis Manager.

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

Get the top-level gate and add three basic events to the document.

myTopGate = myTreeDoc.Gates(1);
createEvent(myTreeDoc);
createEvent(myTreeDoc);
createEvent(myTreeDoc);

Get the event label from the Label property of the Event object. The Events property lists them in the order of their creation. Delete the first event.

firstEvent = myTreeDoc.Events(1);
deleteEvent(myTreeDoc,firstEvent.Label);

Input Arguments

collapse all

Fault tree document in the Safety Analysis Manager, specified as a FaultTreeDocument object.

Event label, specified as a string scalar or character vector.

Data Types: string | char

Version History

Introduced in R2026b

See Also

Objects

Functions