Main Content

updateFromDocument

Class: slreq.Reference
Package: slreq

Update referenced requirements from external requirements document

Syntax

result = updateFromDocument(topRef)

Description

result = updateFromDocument(topRef) updates all the referenced requirements under the Import node topRef.

Input Arguments

expand all

Import node, specified as an slreq.Reference object.

Output Arguments

expand all

The result of the Update operation (pass or fail), returned as a character vector.

Examples

Update Referenced Requirements

% Load a requirement set file
rs = slreq.load('C:\MATLAB\My_Requirement_Set_1.slreqx');

% Find all referenced requirements in the requirement set
allRefs = find(rs, 'Type', 'Reference')

allRefs = 

  1×46 Reference array with properties:

    Id
    CustomId
    Artifact
    ArtifactId
    Domain
    UpdatedOn
    CreatedOn
    CreatedBy
    ModifiedBy
    IsLocked
    Summary
    Description
    Rationale
    Keywords
    Type
    SID
    FileRevision
    ModifiedOn
    Dirty
    Comments

% Update all child referenced requirements of the top Import node  
result = updateFromDocument(allRefs(1))

result =

    'Update completed. Refer to Comments on Import1.'

Introduced in R2019a