M2Doc: Parameters of the physical architecture in AQL

Hi everyone,
I have created a simple physical architecture (see “figure1” attached) and I would like to report the detail of the interconnection in a word document automatically generated with M2Doc.
I need to know the AQL syntax to extract information about the following parameters:
• Name of Physical Components
• Name of Physical Sub Components
• Name of Physical Link
• Direction of Physical Link
• The label of port
The idea is to automatically generate a set of table formatted as following (see “figure2” attached), inserting AQL code in the cells of table body.
Currently, I can only extract the name of Physical Components by writing:
Please, may you kindly help me to write the right AQL syntax to extract the other parameters I need?
Thank you very much.

figure1.jpg
figure2.PNG
figure1.jpg
figure2.PNG

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!

attachment.PNG
attachment.PNG

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.eclipse.org/capella/addons.html -> look for PVMT

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.

code.PNG
code.PNG

Thanks, Antonio, I am sure this will be usefull to others!