Main Content

getLinks

Get links associated with spreadsheet cell in Safety Analysis Manager

Since R2023b

Description

example

links = getLinks(cell) returns the links associated with the spreadsheet cell, cell, in the Safety Analysis Manager.

You must have Simulink® Fault Analyzer™ and Requirements Toolbox™ to use this function.

Examples

collapse all

Suppose that only one spreadsheet is loaded in the Safety Analysis Manager. Retrieve the Spreadsheet object of the spreadsheet.

mySpreadsheet = safetyAnalysisMgr.getOpenDocuments;

Retrieve the cell in the second row and the second column of the spreadsheet as a SpreadsheetCell object.

myCell = getCell(mySpreadsheet,2,2);

Retrieve the links to the spreadsheet cell.

links = getLinks(myCell);

Input Arguments

collapse all

Spreadsheet cell with at least one link, specified as a SpreadsheetCell object.

Output Arguments

collapse all

Links to and from the spreadsheet cell, returned as a structure with two fields that each contain a slreq.Link object array:

  • inLinks – Incoming links to the spreadsheet cell

  • outLinks – Outgoing links from the spreadsheet cell

For more information about creating links to spreadsheet cells in the Safety Analysis Manager, see Link Safety Analysis Manager Cells to Linkable Items.

Version History

Introduced in R2023b