Get incoming links for referenced requirements
myLinks = inLinks(ref)
Get Incoming and Outgoing Links for Referenced Requirements
This example shows how to get incoming and outgoing links for referenced requirements.
MyAdd2 project. Load the
myAddTestSpecification requirement sets.
openProject("MyAdd2"); rs1 = slreq.load("myAddTestSpecification"); rs2 = slreq.load("myAddReqs");
MyAdd2 requirement set, find the referenced requirement with index
ref = find(rs1,Index="1.1");
In the myAddReqs requirement set, find the requirement with index
req = find(rs2,Index="4");
Create a link from the referenced requirement to the requirement. Set the link type to
myLink = slreq.createLink(ref,req); myLink.Type = "Refine";
Get the incoming links for the referenced requirement.
myInLinks = inLinks(ref);
Get the outgoing links for the referenced requirement.
myOutLinks = outLinks(ref);
To get the incoming links for a requirement, use
You can also use the Requirements Editor to view incoming links. Select a referenced requirement. In the right pane, under Links, the incoming links icon indicates incoming links.
Introduced in R2017b