Main Content


Class: slreq.Link
Namespace: slreq

Check if the link destination is resolved


tf = isResolvedDestination(myLink)


tf = isResolvedDestination(myLink) checks if the destination of the link myLink is resolved.

An unresolved link has a source item or destination item that is not available. Items can be unavailable because:

  • The artifact that contains the source or destination item is not loaded.

    For example, loading a requirement set that has incoming links from a Simulink® model also loads the link set that belongs to the model. However, if you do not load the Simulink model, the links are unresolved.

  • The artifact is loaded, but the specified ID does not exist.

    For example, if you delete a linked requirement, the link becomes unresolved because the stored ID no longer corresponds to a valid item.

For more information, see Load and Resolve Links.

Input Arguments

expand all

Handle to a link, specified as an slreq.Link object.

Output Arguments

expand all

The destination resolution status of the slreq.Link object, returned as a Boolean.


expand all

This example shows how to investigate unresolved link destination.

Open the ShortestPath project.


Load the shortest_path_test_reqs requirement set, which also loads the graph_unit_tests link set.

rs = slreq.load("shortest_path_tests_reqs");
myLinkSet = slreq.find(Type="LinkSet");

Get the links from the link set. Get the 15th link in the link set.

linksArray = getLinks(myLinkSet);
myLink = linksArray(15);

Check if the link destination is resolved.

tf = isResolvedDestination(myLink)
tf = logical

Get the information about the unresolved link destination.

destInfo = getReferenceInfo(myLink)
destInfo = struct with fields:
      domain: 'linktype_rmi_slreq'
    artifact: 'shortest_path_func_reqs.slreqx'
          id: '5'

Load the requirement set that the link destination belongs to, then check if the link destination is resolved.

rs = slreq.load(destInfo.artifact);
tf = isResolvedDestination(myLink)
tf = logical


Version History

Introduced in R2019a