Requirement VP - How to display the Type in a diagram?

Hi,

I would like to display the Type of a Requirement on top of its name in the header of the Req graphical box.
I do not find the right request: I tried aql:self.Type, aql:self.ReqIFType: it does not work.
Did not find it in the on-line help…
Probabbly very simple, but difficult to guess for me :wink:

Hi Pascal,
aql:self.requirementType
In the interpreter view, you have completion when hitting Ctrl+Space, this may help!
Stephane

Thanks a lot Stéphane,

I did not try with low-letter req…

Of course, I tried completion, but it did not work :wink:

Hi @pascal.roques,

Can you please send a capture of what you have achieved? I am keen to see how it is represented in the diagram with the requirement type.

Thank you.

image

Thank you @pascal.roques

That is an interesting approach, I believe the use case is to represent more information than the one presented by default (Requirements VP and text) by Capella.

You have used AQL to retrieve the model element information, but may I ask you, how have you changed the requirement model element in the diagram?
Where can it be specified what is shown in the model elements diagram?

To change how requirements are displayed in diagrams: right click on the top element in your aird file (System Engineering element) and select “Configure Requirements Label in Diagrams”.

You may also change the label in the Project explorer tree view here: Menu Windows->Preferences and then Capella->Requirements

Stephane

1 Like

Yes, I am working with David Hetherington on a model for a presentation that will be given at the next ERTS2 conference in Toulouse. The title will be: “STPA Analysis of Automotive Safety and Security Using Arcadia and Capella:wink:

I try to model Losses and Hazards without developping a new add-on. So I am using the Requirements free add-on, creating new Types and Relations…

image

This is a screenshot of the “Configure Requirements Labels in Diagram” command, with the result:

1 Like

Thank you @pascal.roques and @StephaneLacrampe.

I will try what you have mentioned above, it opens new horizons to explore.

After seeing this thread I tried it myself. I found the following code to work in the Requirement Label Expression:

aql:OrderedSet{self.requirementType.ReqIFLongName}->select(s | s != ‘null’ and s.size() >0) ->sep(’\n’)

Which results in this, as an example. I use requirements tagged as Problems to keep track of items that need work in the model.

RequirementTypes

In your case, you can simplify it to:
aql:self.requirementType.ReqIFLongName

3 Likes

Pascal,

I have tried to copy the approach you made here but I am puzzled why I cannot get the attributes to display on separate lines.

Do you have any thoughts?

Unfortunately no.
Did not check the latest versions of the Req Add-on…

Ok thanks. I checked for updates and all was in order. I also tried \r because I am using a MacBook.

I found you book very helpful.

Regards,

Greg

Thanks!
I was guessing the problem could come because of MacOs?

Pascal