Main Content

getAttribute

Class: slreq.Requirement
Package: slreq

Get requirement custom attributes

Syntax

val = getAttribute(req, propertyName)

Description

val = getAttribute(req, propertyName) gets a requirement property that is specified by propertyName.

Input Arguments

expand all

Requirement specified as an slreq.Requirement object.

Requirement property name.

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

Examples

Get Requirement Attributes

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

% Get the Priority (custom attribute) of req1
summaryReq1 = getAttribute(req1, 'Priority')

summaryReq1 = 

  'High'

Introduced in R2018a