Main Content

hasChangedDestination

Class: slreq.Link
Namespace: slreq

Determine if link destination has changes

Since R2022b

Description

tf = hasChangedDestination(myLink) returns 1 (true) if the link myLink has destination changes. Otherwise, it returns 0 (false).

example

Input Arguments

expand all

Link, specified as an slreq.Link object.

Examples

expand all

This example shows how to determine whether a link source or destination artifact has changes.

Open the project.

openProject("ShortestPathChangesExample");

Load the link set file and link. Get the change information for myLink.

myLinkSet = slreq.load("shortest_path.slmx");
linkArray = getLinks(myLinkSet);
myLink = linkArray(1);
changeInfo= getChangeInformation(myLink)
changeInfo = struct with fields:
         source: [1x1 struct]
    destination: [1x1 struct]

Check whether the link has source or destination changes. This link has destination changes.

hasChangedSource(myLink)
ans = logical
   0

hasChangedDestination(myLink)
ans = logical
   1

Review the destination change information.

changeInfo.destination
ans = struct with fields:
            status: 'Changed'
    storedRevision: '10'
    actualRevision: '14'

Version History

Introduced in R2022b