Main Content

enableCallback

Enable or disable callbacks in Safety Analysis Manager spreadsheets

Since R2024a

Description

enableCallback(spreadsheet,callbacks,status) enables or disables the custom callbacks, callbacks, in the Safety Analysis Manager spreadsheet, spreadsheet based on the value of status.

example

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add custom callbacks named myCustomCallback1, myCustomCallback2, and myCustomCallback3 to the spreadsheet.

addCallback(mySpreadsheet,"myCallback1")
addCallback(mySpreadsheet,"myCallback2")
addCallback(mySpreadsheet,"myCallback3")

Enable the first two callbacks, and disable the third.

enableCallback(mySpreadsheet,["myCallback1","myCallback2",...
"myCallback3"],[1,1,0])

Input Arguments

collapse all

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

Custom callback names, specified as a string array or cell array of character vectors.

Data Types: char | string

Status of callbacks, specified as an array of numeric or logical values, 1 (true) or 0 (false). The size of status must match the size of callbacks. Enter 1 or true to enable the callbacks.

Data Types: logical

Version History

Introduced in R2024a