Main Content

deleteCallback

R2026b

Delete custom callback from Safety Analysis Manager documents

Since R2024a

Description

deleteCallback(spreadsheet,callback) deletes the custom callback, callback, from the Safety Analysis Manager spreadsheet, spreadsheet.

example

deleteCallback(faultTreeDocument,callback) deletes the custom callback from the Safety Analysis Manager fault tree document, faultTreeDocument. (since R2026b)

example

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add a custom callback named myCustomCallback to the spreadsheet.

addCallback(mySpreadsheet,"myCustomCallback")

Delete the custom callback named myCustomCallback.

deleteCallback(mySpreadsheet,"myCustomCallback")

Since R2026b

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newDocument("spreadsheet");

Add three custom callbacks to the spreadsheet.

addCallback(mySpreadsheet,"myCustomCallback")
addCallback(mySpreadsheet,"myCustomCallback2")
addCallback(mySpreadsheet,"myCustomCallback3")

Get the names of the custom callbacks by using the getCustomCallbackNames function. The string array lists the elements in the order they were created.

myCustomCallbackNames = getCustomCallbackNames(mySpreadsheet);

Delete the custom callback in the myCustomCallbackNames array that has the index 1.

deleteCallback(mySpreadsheet,myCustomCallbackNames(1))

Since R2026b

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

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

Add a custom callback named myCustomCallback to the fault tree document.

addCallback(myFaultTreeDoc,"myCustomCallback")

Delete the custom callback named myCustomCallback.

deleteCallback(myFaultTreeDoc,"myCustomCallback")

Input Arguments

collapse all

Spreadsheet in the Safety Analysis Manager, specified as a Spreadsheet object.

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

Custom callback, specified as a string scalar or character vector.

Data Types: char | string

Version History

Introduced in R2024a

expand all