Main Content


Class: slreq.Reference
Namespace: slreq

Set referenced requirement custom attributes




setAttribute(ref,propertyName,propertyValue) sets the value of the referenced requirement property or custom attribute, propertyName, to the value specified by propertyValue.

Input Arguments

expand all

Referenced requirement, specified as a slreq.Reference object.

Referenced requirement property or custom attribute name, specified as a string scalar or character vector.

Example: "Priority"

Referenced requirement property or custom attribute value, specified as a string scalar, character vector, double, logical, or datetime. The data type depends on the property type or custom attribute type.

Example: "High"


expand all

This example shows how to set the value of a custom attribute for a referenced requirement.

Load a requirement set called My_Requirement_Set.

rs = slreq.load('C:\MATLAB\My_Requirements_Set.slreqx');

Find the referenced requirement with ID R20.1.

ref1 = find(rs,Type="Reference",ID="R20.1");

Set the Priority custom attribute of the referenced requirement to Low.


Version History

Introduced in R2018a