Main Content

slreq.export

Export requirements as ReqIF files

Since R2023a

Description

dir = slreq.export(reqSetFile) exports the requirement set file, reqSetFile, as a ReqIF™ file. By default, the function names the ReqIF file as export_, followed by the name of the requirement set file.

example

dir = slreq.export(rs) exports the requirement set object, reqSet.

example

dir = slreq.export(req) exports the requirement, req.

example

dir = slreq.export(___,options) exports the requirements using the options, options.

example

Examples

collapse all

Suppose you have a requirement set in the current folder, myReqs.slreqx. Export the requirement set as a ReqIF file.

slreq.export("myReqs.slreqx")
ans =

    'C:\MATLAB\My_Files\export_myReqs.reqif'

Suppose you have a requirement set in the current folder, myReqs.slreqx. Load the requirement set with the slreq.load function.

rs = slreq.load("myReqs.slreqx");

Export the requirement set.

slreq.export(rs)
ans =

    'C:\MATLAB\My_Files\export_myReqs.reqif'

Suppose you have a requirement set in the current folder, myReqs.slreqx and you want to export the requirement with the index 1. Load the requirement set with the slreq.load function.

rs = slreq.load("myReqs.slreqx");

Retrieve the requirement by using the find method.

req = find(rs,Index="1");

Export the requirement.

slreq.export(req)
ans =

    'C:\MATLAB\My_Files\export_myReqs.reqif'

Suppose you have a requirement set in the current folder, myReqs.slreqx, and you want to export the requirement set with a custom name. Load the requirement set with the slreq.load function.

rs = slreq.load("myReqs.slreqx");

Specify the custom name you want by defining a ExportOptions object.

opts = slreq.export.ExportOptions(outputFile="custom_name.reqif");

Export the requirement set by using the slreq.export function.

slreq.export(rs,opts)
ans =

    'custom_name.reqif'

Input Arguments

collapse all

Requirement set file, specified as a string scalar or character vector. If the file is not in the current directory, specify the path and the file name. The .slreqx extension is optional.

Data Types: char | string

Requirement set, specified as an slreq.ReqSet object.

Requirement, specified as an slreq.Requirement object.

Export options, specified as a ExportOptions object. If you do not specify this argument, the function exports the requirements with the default settings of the object.

Output Arguments

collapse all

File name of the exported requirement set ReqIF file, returned as a character vector. The output argument includes the absolute path of the requirement set unless you specify the options argument.

Version History

Introduced in R2023a