updateBacklinks
Class: slreq.LinkSet
Namespace: slreq
Syntax
[checked,added] = updateBacklinks(myLinkSet)
[checked,added,removed] = updateBacklinks(myLinkSet,removeUnmatched)
Description
[
synchronizes the backlinks in external documents to match the links in the link set
checked
,added
] = updateBacklinks(myLinkSet
)myLinkSet
. The method returns the number of links in the link set that
the method checked and the number of backlinks it added to the external document.
[
removes backlinks from the external document that do not have a corresponding link in the link
set when checked
,added
,removed
] = updateBacklinks(myLinkSet
,removeUnmatched
)removeUnmatched
is true
. The method returns
the number of backlinks removed from the external document.
Input Arguments
Output Arguments
Examples
Tips
To remove all forward links and the corresponding backlinks programmatically:
Delete all of the links in the link set except for one by using the
remove
method.Save the link set by using the
save
method.Remove the stale backlinks by updating the backlinks.
Navigate to the external requirement that has the last remaining backlink and interactively delete the backlink.
Delete the remaining link by using the
remove
method.Save the link set by using the
save
method.
You can remove stale backlinks only when the link set contains at least one link. If the link set does not contain links, create a temporary link to the requirements document from which you want to remove backlinks, then remove the backlinks.
For more information on how to interactively remove all forward links and the corresponding backlinks, see Manage Navigation Backlinks in External Requirements Documents.
Alternatives
App
You can also update backlinks by using the Requirements Editor. For more information, see Manage Navigation Backlinks in External Requirements Documents.
Version History
Introduced in R2022a