Main Content

slreq.open

Open requirement set

Description

myReqSet = slreq.open(rs) loads the requirement set rs into memory and opens it in the Requirements Editor.

example

myReqSet = slreq.open(rs,reqID) loads the requirement set and opens the requirement, reqID, in the Requirements Editor.

example

myReqSet = slreq.open(model) opens in the Requirements Editor the requirements sets from the Requirements Table blocks in the specified model. The model must contain at least one Requirements Table block.

example

myReqSet = slreq.open(model,reqID) opens the Requirements Table block requirement that has the ID reqID in the Requirements Editor.

example

Examples

collapse all

This example shows how to load and open a requirement set in the Requirements Editor and return the associated slreq.ReqSet object.

rs = slreq.open("basicReqSet");

Open the requirement that has the SID of 3 in the Requirements Editor.

openExample("slrequirements/OpenARequirementSetExample")
rs = slreq.open("basicReqSet",3);

Open a requirement set from a Requirements Table block in the reqTableDurationModel1.slx model in the Requirements Editor.

openExample("slrequirements/LoadRequirementSetAndLinkSetForRequirementsTableBlockExample")
rs = slreq.open("reqTableDurationModel1.slx");

Open the requirement that has the SID of 2 in the Requirements Editor.

rs = slreq.open("reqTableDurationModel1.slx",2);

Input Arguments

collapse all

Requirement set to open, specified as a string scalar or character vector that lists the name or path of the requirement set file, or as a slreq.ReqSet object.

Requirement identifier, specified as a:

  • Requirement ID or custom ID as a string scalar or character vector

  • Requirement SID as a scalar integer

Example: myReqSet = slreq.open("functionalRequirements.slreqx","REQ-001");

Example: myReqSet = slreq.open("functionalRequirements.slreqx",5);

Name or path of the Simulink model to load, including the .slx extension, specified as a string scalar or character vector. The model must contain at least one Requirements Table block. Each block has a separate requirement set. See Configure Properties of Formal Requirements.

Output Arguments

collapse all

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

Version History

Introduced in R2018a

expand all