Main Content

discard

Class: slreq.ReqSet
Package: slreq

Close requirement set without saving

Syntax

discard(rs)

Description

discard(rs) closes the requirement set rs without saving.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Examples

expand all

This example shows how to discard changes to a requirement set without saving.

Open the CruiseRequirementsExample project. Load the crs_req_func_spec requirement set.

slreqCCProjectStart;
rs = slreq.load("crs_req_func_spec");

Set the description of the requirement set to crs_req_func_spec.

rs.Description = "crs_req_func_spec"
rs = 
  ReqSet with properties:

             Description: 'crs_req_func_spec'
                    Name: 'crs_req_func_spec'
                Filename: '/tmp/Bdoc22b_2054784_2785512/bml.batserve.159352/MATLAB/Projects/examples/CruiseRequirementsExample2/documents/crs_req_func_spec.slreqx'
                Revision: 66
                   Dirty: 1
    CustomAttributeNames: {}
               CreatedBy: 'itoy'
               CreatedOn: 27-Feb-2017 10:20:39
              ModifiedBy: 'Shashidhar'
              ModifiedOn: 13-Jul-2021 10:50:42

Discard the changes to the requirement set without saving.

discard(rs);

Tips

  • You can also use close to close a requirement set, which prompts you to save the requirement set before closing.

  • You can use save to save the requirement set before discarding.

  • You can use slreq.clear to close all requirement sets and link sets without saving and close the Requirements Editor.

Version History

Introduced in R2017b