Hi Antonio,
Not answering directly your question, but have you tried to use the Sirius Interpreter View in Capella? It will enable you to test your AQL queries on the model element you’ve selected. Ctrl+Space will give you completion. It should help you to navigate in the model. (
https://wiki.eclipse.org/Sirius/Tutorials/StarterTutorial#Test_your_Sirius_expression_with_the_interpreter)
Also, you’ll find the AQL doc here:
https://www.eclipse.org/acceleo/documentation/aql.html
Stephane Lacrampe
ObeoSoft Canada
Hi Stephane,
thank you for your reply.
Actually, I have used the Sirus Interpreter but I didn’t know the “Ctrl+Space” function. Thanks to your suggestion, I have found the way to obtain the physical links, ports, ect.
However, it is not still clear how to filter the capella elements using the applied properties. I don’t know why, the following code doesn’t work:
In the “Interfaces” folder of Project Explorer I have defined a StringPropertyValue with name “Item” and value “Unit” (see attachment). I applied this property to my physical component in order to create a distinction between components and subcomponents.
Do you have any other suggestion for me?
Thank you!
Hi Antonio,
I guess these two forum threads should help you:
https://forum.mbse-capella.org/t/623/
https://forum.mbse-capella.org/t/905/
Also just in case you’re not aware of this, you may want to have a look at the PVMT add-on:
https://www.youtube.com/watch?v=ieVmw54YE94
All the best,
Stephane
Thank you Stephane.
I would like to share with community the code I have written to filter the components and subcomponents.
Create two StringPropertyValue elements:
Item = COMPONENT
Item = SUBCOMPONENT
Apply these elements to your components and subcomponents in Capella. In my case, I have applied them to physical elements, but the code can be also rewritten for logical ones.
After that, in your word template, type:
When you generate your document, you will have a table with the list of all components to which you applied Item = COMPONENT as exstension property.
If you type , you will have the list of all subcomponents.
Let’s hope this code may be usefull.
Thank you a lot.
Bye.
Thanks, Antonio, I am sure this will be usefull to others!