Main Content

updateSrcArtifactUri

Class: slreq.ReqSet
Package: slreq

Update document resource identifier of imported requirements

Syntax

updateSrcArtifactUri(rs,oldURI,newURI)

Description

updateSrcArtifactUri(rs,oldURI,newURI) updates the Artifact property from oldURI to newURI for the referenced requirements in the requirement set rs that have Artifact set to oldURI. Use this function to update the external requirements document associated with the imported requirements from non-file-based domains, such as a query URL.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Resource identifier for the original external document, specified as a string scalar or character vector.

Resource identifier for the new external document, specified as a string scalar or character vector.

Examples

expand all

This example shows how to update the stored query for requirements that were previously imported to a requirement set called myReqSet.

Get a handle to the requirement set called myReqSet.

rs = slreq.find(Type="ReqSet",Name="myReqSet");

Get a handle to the import node for the requirement set.

topRef = children(rs);

Update the query stored in the Artifact property of the referenced requirements in the requirement set.

oldURI = topRef.Artifact;
newURI = "rm:ofType=%3A9443%2Frm2%2Ftypes%2F_C1KXMwJgEeuFW5Ss3RBk7w%3E";
updateSrcArtifactUri(rs,oldURI,newURI);

Tips

  • If you rename or move an external requirements document file, use updateSrcFileLocation to update the file name or path of the referenced requirements in the requirement set.

  • If you rename or move an external requirements document, you can update the link destinations for direct links by using updateDocUri.

Version History

Introduced in R2022a