Main Content

redirectLinksToImportedReqs

Class: slreq.LinkSet
Namespace: slreq

Redirect link destination from external document to imported requirement set

Syntax

count = redirectLinksToImportedReqs(myLinkSet,rs)

Description

count = redirectLinksToImportedReqs(myLinkSet,rs) redirects the link destinations for the direct links in the link set myLinkSet from the requirements in an external document to the imported referenced requirements in the requirement set rs.

Input Arguments

expand all

Link set, specified as an slreq.LinkSet object.

Requirement set, specified as an slreq.ReqSet object.

Output Arguments

expand all

Number of updated slreq.Link objects in the link set, returned as a character vector.

Examples

expand all

This example shows how to programmatically redirect the link destinations for direct links from an external document to a corresponding imported requirement.

Open the FuelSysWithReqLinks model. Find the link set associated with the model.

open_system("FuelSysWithReqLinks.slx")
myLinkSet = slreq.find("Type","LinkSet","Name","FuelSysWithReqLinks");

The model contains direct links to these documents:

  • FuelSysDesignDescription.docx

  • FuelSysRequirementsSpecification.docx

  • FuelSysTestScenarios.xlsx

Redirect Links to Imported References

Load the requirement set FuelSysRequirements. The requirement set contains imported referenced requirements from the documents listed above. The import process is described in Migrating Requirements Management Interface Data to Requirements Toolbox.

rs = slreq.load("FuelSysRequirements.slreqx");

Redirect the link destination for the direct links in the link set myLinkSet to the imported referenced requirements.

count = redirectLinksToImportedReqs(myLinkSet,rs)
count = 13

Tips

Version History

Introduced in R2018a