Main Content

inspectAttribute

Class: slreq.LinkSet
Package: slreq

Get information about link set custom attribute

Syntax

atrb = inspectAttribute(myLinkSet,name)

Description

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.

Examples

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.

slreq.load('crs_req');
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'}

Cleanup

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

slreq.clear;
bdclose all;
Introduced in R2020b