Main Content

addDocumentAttribute

Add document attribute to spreadsheet in Safety Analysis Manager

Since R2023b

Description

addDocumentAttribute(spreadsheet) adds a document attribute to the spreadsheet in the Safety Analysis Manager, spreadsheet.

example

addDocumentAttribute(spreadsheet,Name=Value) adds a document attribute to the spreadsheet using one or more name-value arguments.

example

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add a document attribute to the spreadsheet.

addDocumentAttribute(mySpreadsheet)

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add a document attribute to the spreadsheet with the property name myAttribute1 and a value of 1.

addDocumentAttribute(mySpreadsheet,property="myAttribute1",value="1")

Input Arguments

collapse all

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

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: addDocumentAttribute(mySpreadsheet,property="myAttribute") adds a document attribute to the Spreadsheet object, mySpreadsheet, with the property myAttribute.

Property of the document attribute, specified as a string scalar or character vector. The property must be unique.

If you do not specify this argument, the function adds a document attribute with a predefined label, PropertyN, where N is the number of document attributes that use the default label.

Data Types: char | string

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

Data Types: char | string

Version History

Introduced in R2023b