Main Content

Create Requirement Links

Create links to establish traceability between requirements and designs or tests

Link requirements to designs and tests in MATLAB® and Simulink®, and architectures in System Composer™.

Alternatively, you can link directly to external requirements in third-party applications. For more information, see Create Links to External Requirements.

Apps

Requirements EditorCreate and edit requirements
Requirements ManagerManage requirements and links in model
Profile EditorCreate and manage profiles with stereotypes and properties

Blocks

System RequirementsList system requirements in Simulink models

Functions

expand all

slreq.createLinkCreate traceable links
slreq.generateTraceabilityMatrixCreate traceability matrix (Since R2021a)
slreq.createTextRangeCreate line ranges (Since R2022b)
rmitagManage keywords for links
slreq.findFind requirement, reference, and link set artifacts
slreq.inLinksGet incoming links for requirement or other linkable item
slreq.outLinksGet outgoing links for a block or other linkable item
slreq.getDependentLinkSetsRetrieve link sets with incoming links to requirement set (Since R2023a)
slreq.getExternalURLGet navigation URL for link source or destination, requirement, test or Simulink model element (Since R2021a)
slreq.getIncomingLinkTypeLabelRetrieve incoming link type label (Since R2023a)
slreq.getOutgoingLinkTypeLabelRetrieve outgoing link type label (Since R2023a)
slreq.getTextRangeGet line ranges (Since R2022b)
slreq.structToObjConvert link source or destination information from structure to model object type
slreq.showNavigate to link source or destination (Since R2020a)
slreq.loadLoad requirement set, link set, or Requirements Table block
slreq.clearClear requirements and links from memory
slreq.mapGet or set path to link set file

Classes

expand all

slreq.LinkSet Work with link sets
slreq.LinkTraceable link
slreq.ReqSet Work with requirement sets
slreq.Reference Work with external requirement proxy objects
slreq.JustificationRequirement justifications

Methods

expand all

Get Links

findFind links in link set with matching attribute values
getLinksGet links from link set
getBrokenLinksGet links with invalid destination
getOrphanLinksGet links with invalid source

Get Link Sources, Line Ranges, and Requirement Sets

sources Get link sources
getRegisteredReqSetsGet requirement sets registered in link set
getTextRangeGet line ranges
getTextRangesGet lines ranges that span multiple lines

Customize Link Sets

addAttributeAdd custom attribute to link set
importProfileAssign profile to ink set
inspectAttributeGet information about link set custom attribute
profilesGet profiles assigned to link set
removeProfileRemove profile from link set

Save and Delete Links

save Save link set
deleteOrphanLinksDelete links with invalid source

Get Traceability Information

linkSetGet link set for link
getDestinationOpenCommand Retrieve command that opens link destination
getSourceOpenCommand Retrieve command that opens link source
getDestinationURL Retrieve URL that opens link destination
getSourceURL Retrieve URL that opens link source
getDestinationLabelGet label that identifies link destination
getSourceLabelGet label that identifies link source
getIncomingTypeLabel Get type label for incoming link
getOutgoingTypeLabel Get type label for outgoing link

Get and Set Source and Destination

source Get link source
destination Get link destination
setSource Set requirement link source
setDestination Set requirement link destination

Add Comments and Customize Links

addCommentAdd comments to links
getAttributeGet link property values
setAttributeSet link property values

Remove Links

removeDelete links

Check Unresolved Links

getReferenceInfoGet unresolved link destination
isResolved Check if the link is resolved
isResolvedDestination Check if the link destination is resolved
isResolvedSource Check if the link source is resolved
getImplementationStatus Query requirement set implementation status summary
updateImplementationStatusUpdate requirement set implementation status summary
inLinksGet incoming links for requirements
outLinksGet outgoing links for requirements
getImplementationStatus Query requirement implementation status summary
isJustifiedForCheck if requirement is justified
justifyImplementation Justify requirements for implementation
inLinksGet incoming links for referenced requirements
outLinksGet outgoing links for referenced requirements
getImplementationStatus Query referenced requirement implementation status summary
isJustifiedForCheck if referenced requirement is justified
justifyImplementation Justify referenced requirements for implementation
outLinksGet outgoing links for justifications

Objects

slreq.TextRangeLine range (Since R2022b)
slreq.matrix.ConfigurationTraceability matrix configuration (Since R2024a)
slreq.matrix.FilterFilter for traceability matrix (Since R2024a)

Object Functions

expand all

deleteLinksDelete links for line ranges
getLineRangeGet line numbers for line range
getLinksGet links for line range
getTextGet contents of line range
removeDelete unused line ranges
setLineRangeSet line numbers for line range
showOpen and highlight line range in MATLAB Editor
addFilterToCellAdd cell filter to traceability matrix configuration
addFilterToHighlightAdd highlighting to traceability matrix configuration
addFilterToLeftAdd filter to left artifacts in traceability matrix configuration
addFilterToMatrixAdd matrix settings filter to traceability matrix configuration
addFilterToTopAdd filter to top artifacts in traceability matrix configuration
exportToScriptExport traceability matrix configuration to script

Topics

Link Requirements, Architectures, Designs, and Tests

Load and Customize Links

Featured Examples