Main Content

getChangeInformation

Class: slreq.Link
Namespace: slreq

Get link change information

Since R2022b

Description

changeInfo = getChangeInformation(myLink) returns the change information for the link myLink.

example

Input Arguments

expand all

Link for which to get change information, specified as an slreq.Link object.

Output Arguments

expand all

Link change information, returned as a structure with source and destination fields.

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