Main Content

getLinks

Get links associated with spreadsheet cell or row in Safety Analysis Manager

Since R2023b

Description

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

You must have Requirements Toolbox™ to use this function.

example

links = getLinks(spreadsheetRow) returns the links associated with the specified spreadsheet row. (since R2024b)

example

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

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

mySpreadsheet = safetyAnalysisMgr.getOpenDocuments;

Retrieve the second row in the spreadsheet as a SpreadsheetRow object.

myRow = getRow(mySpreadsheet,2);

Retrieve the links to the spreadsheet row.

links = getLinks(myRow);

Input Arguments

collapse all

Cell in the Safety Analysis Manager spreadsheet, specified as a SpreadsheetCell object.

Since R2024b

Row in the Safety Analysis Manager spreadsheet, specified as a SpreadsheetRow object.

Output Arguments

collapse all

Links to and from the spreadsheet cell or row, 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 and rows in the Safety Analysis Manager, see Link Safety Analysis Manager Spreadsheet Cells and Rows to Linkable Items.

Version History

Introduced in R2023b

expand all