Main Content


Class: slreq.Reference
Package: slreq

Set referenced requirement custom attributes


setAttribute(ref, propertyName, propertyValue)


setAttribute(ref, propertyName, propertyValue) sets a referenced requirement property. Use this method to set the values of custom attributes that you define for your requirement set.

Input Arguments

expand all

Referenced requirement specified as an slreq.Reference object.

Referenced requirement custom attribute name.

Example: 'Priority'

Referenced requirement custom attribute name, specified as a character vector.

Example: 'High', 'Medium'


Set Referenced Requirement Custom Attribute

% Load a requirement set file and get the handle to one requirement 
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');
ref1 = find(rs, 'Type', 'Reference', 'ID', 'R20.1');

% Set the Priority (custom attribute) of ref1
setAttribute(ref1, 'Priority', 'Low');

Version History

Introduced in R2018a