Main Content

renameCallback

R2026b

Rename custom callbacks in Safety Analysis Manager spreadsheets

Since R2024a

Description

renameCallback(spreadsheet,name,newName) renames the custom callback that has the name oldName to the name newName in the Safety Analysis Manager spreadsheet spreadsheet.

example

renameCallback(faultTreeDocument,name,newName) renames the custom callback in 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")

Rename the custom callback to updatedCustomCallback.

renameCallback(mySpreadsheet,"myCustomCallback","updatedCustomCallback")

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")

Rename the custom callback to updatedCustomCallback.

renameCallback(myFaultTreeDoc,"myCustomCallback","updatedCustomCallback")

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 name, specified as a string scalar or character vector.

Data Types: char | string

Updated custom callback name, specified as a string scalar or character vector. You must use a name that follows the naming conventions for variables in MATLAB®.

Data Types: char | string

Version History

Introduced in R2024a

expand all