Main Content

linkSet

Class: slreq.Link
Namespace: slreq

Get link set for link

Syntax

myLinkSet = linkSet(myLink)

Description

myLinkSet = linkSet(myLink) returns the link set that the link specified by myLink belongs to.

Input Arguments

expand all

Link, specified as an slreq.Link object.

Output Arguments

expand all

Link set, returned as an slreq.LinkSet object.

Examples

expand all

This example shows how to get the link set for a link.

Open the ShortestPath project.

openProject("ShortestPath");

Load the shortest_path_func_reqs requirement set.

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

Find the loaded links.

myLinks = slreq.find(Type="Link")
myLinks=1×37 Link array with properties:
    Type
    Description
    Keywords
    Rationale
    CreatedOn
    CreatedBy
    ModifiedOn
    ModifiedBy
    Revision
    SID
    Comments

Get the link set for the first link.

myLinkSet = linkSet(myLinks(1));

Display the name of the link set.

[~,name,ext] = fileparts(string(myLinkSet.Filename));
disp(name+ext)
graph_unit_tests.slmx

Version History

Introduced in R2018a