Main Content

getDocumentAttribute

Retrieve document attribute values in spreadsheet in Safety Analysis Manager

Since R2023b

Description

value = getDocumentAttribute(spreadsheet,property) returns the document attribute value in the Safety Analysis Manager spreadsheet, spreadsheet, that has the property, property.

example

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add three document attributes to the spreadsheet by using the addDocumentAttribute function.

addDocumentAttribute(mySpreadsheet,property="myAttribute1",value="1")
addDocumentAttribute(mySpreadsheet,property="myAttribute2",value="2")
addDocumentAttribute(mySpreadsheet,property="myAttribute3",value="3")

Retrieve the value of the document attribute with the property myAttribute1.

vals = getDocumentAttribute(mySpreadsheet,"myAttribute1");

Input Arguments

collapse all

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

Property of the document attribute, specified as a string scalar or character vector.

Data Types: char | string

Output Arguments

collapse all

Value of the document attribute, returned as a character vector.

Version History

Introduced in R2023b