Delete links for line ranges
Remove Line Ranges
This example shows how to remove an
myAdd code file and load the
myAddRequirements requirement set.
file = "myAdd.m"; open(file); rs = slreq.load("myAddRequirements");
slreq.TextRange object associated with line 1 in the
cr = slreq.getTextRange(file,1)
cr = TextRange with properties: Artifact: '/tmp/Bdoc23b_2361005_1420693/tp040db613/slrequirements-ex93174860/myAdd.m' Id: '738659.742.1' Domain: 'linktype_rmi_matlab' Parent: ''
Get the links associated with the
links = getLinks(cr)
links=1×3 object 1x3 Link array with properties: Type Description Keywords Rationale CreatedOn CreatedBy ModifiedOn ModifiedBy Revision SID Comments
Delete the links associated with the
count = deleteLinks(cr)
count = 3
slreq.TextRange object associated with line number 1.
count — Number of links removed
Number of links removed, returned as a scalar
Introduced in R2022b