Main Content

slreq.load

Load requirement set, link set, or Requirements Table block

Description

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

example

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

example

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

example

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

example

[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.

example

Examples

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");

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));
disp(name+ext)
myAdd.slmx

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 that contains the file name of one of these link source artifact types:

  • Simulink or System Composer™ models

  • Simulink data dictionaries

  • Simulink Test™ files

  • MATLAB® code files

  • C and H files

You must include 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. You must include the .slx extension. The function loads the requirement sets associated with the Requirement Table blocks. For more information, see Configure Properties of Formal Requirements.

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