add

Class: slreq.Reference
Package: slreq

Add referenced requirements

Syntax

refNew = add(rs, 'Artifact',FileName,'PropertyName',PropertyValue)
refChild = add(ref,'Artifact',FileName,'PropertyName',PropertyValue)

Description

refNew = add(rs, 'Artifact',FileName,'PropertyName',PropertyValue) adds a referenced requirement refNew to a requirements set rs which references requirements from the external document specified by FileName with properties and custom attributes specified by PropertyName and PropertyValue.

refChild = add(ref,'Artifact',FileName,'PropertyName',PropertyValue) adds a referenced child requirement refChild to a referenced requirement ref which references requirements from the external document specified by FileName with properties and custom attributes specified by PropertyName and PropertyValue.

Input Arguments

expand all

Requirements set file, specified as an slreq.ReqSet object.

Referenced requirement, specified as an slreq.Reference object.

File name for a top-level container identifier, such as a Microsoft® Office document name or an IBM® Rational® DOORS® Module unique ID.

Output Arguments

expand all

The referenced requirement that was added, returned as an slreq.Reference object.

The referenced child requirement that was added, returned as an slreq.Reference object.

Examples

Add a Referenced Requirement

% Load a requirement set file

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

% The parent external document for rs is Req_doc.docx
% Add a top-level referenced requirement to rs
newRef1 = add(rs, 'Artifact', 'crs_req.docx', 'Id', '5.0', 'Summary', ...
 'Additional Requirement');

% Add a child referenced requirement to newRef1
newRef2 = add(newRef1, 'Artifact', 'crs_req.docx', 'Id', '5.1', 'Summary', ... 
'Additional Child Requirement');

Introduced in R2018a