Filter löschen
Filter löschen

Custom requirement attribute error

2 Ansichten (letzte 30 Tage)
Marco Massaro
Marco Massaro am 29 Jan. 2019
Beantwortet: Yongjian Feng am 28 Jun. 2021
Hello,
I have followed the documentation of Simulink Requirement and tried to create a custom attribute for a requirement.
req = add(testReqSet)
req =
Requirement with properties:
Type: 'Functional'
Id: '#2'
Summary: ''
Description: ''
Keywords: [0×0 char]
Rationale: ''
CreatedOn: 29-Jan-2019 14:22:59
CreatedBy: 'xxxx'
ModifiedBy: 'xxxx'
SID: 2
FileRevision: 1
ModifiedOn: 29-Jan-2019 14:22:59
Dirty: 1
Comments: [0×0 struct]
>> setAttribute(req, 'Priority', 'Low');
and it returns:
Error using slreq.BaseEditableItem/setAttribute
No such attribute.Custom Attribute creation
What's wrong ?
Thanks.
Regards!

Antworten (1)

Yongjian Feng
Yongjian Feng am 28 Jun. 2021
Hello Marco,
'Priority' is not an attribute of a Requirement yet. First a custom attribute 'Priority' needs to be added, and then its value can be set.
Thanks,
Yongjian

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by