Main Content

outLinks

Class: slreq.Reference
Namespace: slreq

Get outgoing links for referenced requirements

Syntax

myLinks = outLinks(ref)

Description

myLinks = outLinks(ref) returns the outgoing links for the referenced requirement ref.

Input Arguments

expand all

Referenced requirement, specified as a slreq.Reference object.

Output Arguments

expand all

Outgoing links for the requirement, returned as an slreq.Link array.

Examples

expand all

This example shows how to get incoming and outgoing links for referenced requirements.

Open the MyAdd2 project. Load the myAddReqs and myAddTestSpecification requirement sets.

openProject("MyAdd2");
rs1 = slreq.load("myAddTestSpecification");
rs2 = slreq.load("myAddReqs");

In the MyAdd2 requirement set, find the referenced requirement with index 1.1.

ref = find(rs1,Index="1.1");

In the myAddReqs requirement set, find the requirement with index 4.

req = find(rs2,Index="4");

Create a link from the referenced requirement to the requirement. Set the link type to Refine.

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);

Tips

  • To get the outgoing links for a requirement, use the outLinks method of slreq.Requirement. To get the outgoing links for a justification, use the outLinks method of slreq.Justification.

Alternative Functionality

App

You can also use the Requirements Editor to view outgoing links. Select a referenced requirement. In the right pane, under Links, the outgoing links icon indicates outgoing links.

Version History

Introduced in R2017b