Main Content

addDocumentAttribute

R2026b

Add document attribute to spreadsheet in Safety Analysis Manager

Since R2023b

Description

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

example

addDocumentAttribute(faultTreeDocument) adds a document attribute to the Safety Analysis Manager fault tree document, faultTreeDocument. (since R2026b)

addDocumentAttribute(___,Name=Value) adds a document attribute to the spreadsheet or fault tree document 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)

Since R2026b

Create a new fault tree document in the Safety Analysis Manager.

myFaultTreeDoc = safetyAnalysisMgr.newDocument("fault-tree");

Add a document attribute to the fault tree document.

addDocumentAttribute(myFaultTreeDoc)

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.

Fault tree document in the Safety Analysis Manager, specified as a FaultTreeDocument object.

Name-Value Arguments

collapse all

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

expand all