Main Content


Class: slreq.ReqSet
Namespace: slreq

Get information about requirement set custom attribute

Since R2020b


atrb = inspectAttribute(rs,name)


atrb = inspectAttribute(rs,name) returns a structure with information about the custom attribute name specified by name in the requirement set rs.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Custom attribute name, specified as a character array.

Output Arguments

expand all

Custom attribute information, returned as a struct.


expand all

This example shows how to get information about a requirement set custom attribute.

Load crs_req_func_spec, which describes a cruise control system. Find a requirement set and assign it to a variable.

rs = slreq.find('Type','ReqSet');

Add a Checkbox custom attribute to the requirement set with a description. Use inspectAttribute to get information about the custom attribute.

    'This checkbox atrribute can be true or false.');
atrb = inspectAttribute(rs,'MyCheckbox')
atrb = struct with fields:
           name: 'MyCheckbox'
           type: Checkbox
    description: 'This checkbox atrribute can be true or false.'
        default: 0


Clear the open requirement sets and close the open models without saving changes.

bdclose all;

Version History

Introduced in R2020b