getAttribute

Class: slreq.Reference
Package: slreq

Get referenced requirement custom attributes

Syntax

val = getAttribute(ref, propertyName)

Description

val = getAttribute(ref, propertyName) gets a referenced requirement property.

Input Arguments

expand all

Reference to a requirement specified as an slreq.Reference object.

Referenced requirement property name.

Example: 'SID', 'CreatedOn', 'Summary'

Examples

Get Referenced Requirement Attributes

% Load a requirement set file and get the handle to 
% one referenced requirement 

rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');
ref1 = find(rs, 'Type', 'Reference', 'Id', 'R10.1');

% Get the Priority (custom attribute) of ref1
summaryRef1 = getAttribute(ref1, 'Priority')

summaryRef1 = 

  'Medium'

Introduced in R2018a