Main Content


Load requirement set or link set



myReqSet = slreq.load(reqSetFile) loads the requirement set into memory.


myReqSet = slreq.load(reqSetFile,forceResolve) loads the requirement set and fixes the outdated profile when forceResolve is true. For more information, see Customize Requirements and Links by Using Stereotypes.


myLinkSet = slreq.load(linkSetFile) loads the link set into memory.


myLinkSet = slreq.load(artifact) loads the link set associated with the link source artifact into memory.


[myLinkSet,myReqSet] = slreq.load(model) loads a Simulink® model that contains at least one Requirements Table block and loads the associated requirement set and link set into memory.


collapse all

Load a requirement set and return the associated slreq.ReqSet object.

rs = slreq.load("basicReqSet");

Load a requirement set that has an outdated profile.

rs = slreq.load("myAddRequirementsOutdated",true);

Load a link set that contains direct links between requirements in Microsoft® Word and model elements in Simulink®.

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

Close the link set.


This example shows how to load the link set for a link source artifact.

Load the link set associated with the myAdd MATLAB® code file.

myLinkSet = slreq.load("myAdd.m");

Display the link set file name.

[~,name,ext] = fileparts(string(myLinkSet.Filename));

Load the Simulink model®, requirement set, and link set associated with a Requirements Table block in a Simulink® model.

[myLinkSet,myReqSet] = slreq.load("reqTableDurationModel1.slx");

Input Arguments

collapse all

Requirement set file to load, specified as a string scalar or character vector.

Example: myReqSet = slreq.load("myReqSet.slreqx")

Link set file to load, specified as a string scalar or character vector.

Example: myLinkSet = slreq.load("myLinkSet.slmx")

Option to fix outdated profile when loading requirement set, specified as 1 (true) or 0 (false) of data type logical.

Example: myReqSet = slreq.load("myReqSet.slreqx",1)

Link source artifact to load, specified as a string scalar or character vector. The valid link source artifact types are:

  • Simulink or System Composer™ models

  • Simulink data dictionaries

  • Simulink Test™ files

  • MATLAB® code files

  • C and H files

You must specify the file extension.

Example: myLinkSet = slreq.load("myFunction.m")

Simulink model to load, specified as a string scalar or character vector. The model must contain at least one Requirements Table block. Each block is associated with a requirement set. See Configure Properties of Formal Requirements. You must include the .slx extension.

Example: [myLinkSet,myReqSet] = slreq.load("myReqTableModel.slx")

Output Arguments

collapse all

Loaded requirement set, returned as an slreq.ReqSet object.

Loaded link set, returned as an slreq.LinkSet object.

Version History

Introduced in R2018a