Main Content


Class: slreq.LinkSet
Namespace: slreq

Get information about link set custom attribute

Since R2020b


atrb = inspectAttribute(myLinkSet,name)


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

Input Arguments

expand all

Link set, specified as an slreq.LinkSet 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 link set custom attribute.

Load the crs_req requirement files, which describes a cruise control system. Find a link set from the files and assign it to a variable.

ls = slreq.find('Type','LinkSet');

The custom attribute Target Speed Change tracks whether linked requirements are related to incrementing or decrementing the speed, or not related at all. Get information about this custom attribute.

atrb = inspectAttribute(ls,'Target Speed Change')
atrb = struct with fields:
           name: 'Target Speed Change'
           type: Combobox
    description: 'Tracks if linked requirements are related to incrementing or decrementing speed. Unset if unrelated to speed change.'
           list: {'Unset'  'Increment'  'Decrement'}


Clear the open requirement sets, link sets, and open models without saving changes.

bdclose all;

Version History

Introduced in R2020b