Main Content

clearChangeIssues

Class: slreq.Link
Namespace: slreq

Clear link change issue

Since R2022b

Description

clearChangeIssues(myLink) clears change issues for the link specified by myLink.

example

clearChangeIssues(___,Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in previous syntaxes.

example

Input Arguments

expand all

Link for which to clear change issues, specified as an slreq.Link object.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: target="Source"

Comment, specified as a string scalar or character vector. Use comments to record information about the cleared change issues.

Example: comment="clearing destination change issues"

Data Types: char | string

Link item location for which to clear change issues, specified as "All", "Destination", or "Source".

Data Types: char | string

Examples

expand all

This example shows how to clear change issues for a link.

Open the project.

openProject("ShortestPathChangesExample");

Load the link set file.

myLinkSet = slreq.load("shortest_path.slmx");

Get the change information for the link set and get the link with the destination change.

slreq.getChangeInformation(myLinkSet)
ans = 
  ChangeInformation with properties:

         LinksWithChangedSource: [0x0 slreq.Link]
    LinksWithChangedDestination: [1x1 slreq.Link]
                  SourceChanges: [1x0 struct]
                    DestChanges: [1x1 struct]

myLink = getLinksWithChangedDestination(myLinkSet);

Clear the change issue for the link myLink.

clearChangeIssues(myLink);
slreq.getChangeInformation(myLinkSet)
ans = 
  ChangeInformation with properties:

         LinksWithChangedSource: [0x0 slreq.Link]
    LinksWithChangedDestination: [0x0 slreq.Link]
                  SourceChanges: [1x0 struct]
                    DestChanges: [1x0 struct]

This example shows how to clear change issues for a link.

Open the project.

openProject("ShortestPathChangesExample");

Load the link set file.

myLinkSet = slreq.load("shortest_path.slmx");

Get the change information for the link set and get the link with the destination change.

slreq.getChangeInformation(myLinkSet)
ans = 
  ChangeInformation with properties:

         LinksWithChangedSource: [0x0 slreq.Link]
    LinksWithChangedDestination: [1x1 slreq.Link]
                  SourceChanges: [1x0 struct]
                    DestChanges: [1x1 struct]

myLink = getLinksWithChangedDestination(myLinkSet);

Clear the destination change issue for the link myLink.

clearChangeIssues(myLink,target="Destination");
slreq.getChangeInformation(myLinkSet)
ans = 
  ChangeInformation with properties:

         LinksWithChangedSource: [0x0 slreq.Link]
    LinksWithChangedDestination: [0x0 slreq.Link]
                  SourceChanges: [1x0 struct]
                    DestChanges: [1x0 struct]

Version History

Introduced in R2022b