Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Polarsys » M2Doc » M2Doc: Parameters of the physical architecture in AQL
M2Doc: Parameters of the physical architecture in AQL [message #1826407] Fri, 24 April 2020 13:18 Go to next message
Antonio Lovascio is currently offline Antonio LovascioFriend
Messages: 3
Registered: April 2020
Junior Member
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.

index.php/fa/37937/0/

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.

index.php/fa/37938/0/

Currently, I can only extract the name of Physical Components by writing:

{m:for pc | self.eAllContents(pa::PhysicalComponent)}
•	Physical Component: {m:pc.name}
{m:endfor}


Please, may you kindly help me to write the right AQL syntax to extract the other parameters I need?
Thank you very much.
  • Attachment: figure1.jpg
    (Size: 343.98KB, Downloaded 479 times)
  • Attachment: figure2.PNG
    (Size: 30.02KB, Downloaded 423 times)
Re: M2Doc: Parameters of the physical architecture in AQL [message #1826436 is a reply to message #1826407] Fri, 24 April 2020 18:50 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
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


Stephane LACRAMPE
Obeo Canada
Re: M2Doc: Parameters of the physical architecture in AQL [message #1826464 is a reply to message #1826436] Sat, 25 April 2020 10:06 Go to previous messageGo to next message
Antonio Lovascio is currently offline Antonio LovascioFriend
Messages: 3
Registered: April 2020
Junior Member
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:

aql: self.eAllContents(pa::PhysicalComponent)->select(p|p.appliedPropertyValues.value='Unit')


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!
Re: M2Doc: Parameters of the physical architecture in AQL [message #1826481 is a reply to message #1826464] Sat, 25 April 2020 16:43 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
Hi Antonio,

I guess these two forum threads should help you:
https://polarsys.org/forums/index.php/t/623/
https://polarsys.org/forums/index.php/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


Stephane LACRAMPE
Obeo Canada
Re: M2Doc: Parameters of the physical architecture in AQL [message #1826809 is a reply to message #1826407] Fri, 01 May 2020 07:08 Go to previous messageGo to next message
Antonio Lovascio is currently offline Antonio LovascioFriend
Messages: 3
Registered: April 2020
Junior Member
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:

index.php/fa/38016/0/

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
{m:if PV.value = 'SUBCOMPONENT'}
, you will have the list of all subcomponents.

Let's hope this code may be usefull.
Thank you a lot.
Bye.
  • Attachment: code.PNG
    (Size: 12.04KB, Downloaded 373 times)
Re: M2Doc: Parameters of the physical architecture in AQL [message #1826825 is a reply to message #1826809] Fri, 01 May 2020 16:04 Go to previous message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
Thanks, Antonio, I am sure this will be usefull to others!

Stephane LACRAMPE
Obeo Canada
Previous Topic:M2Doc Diagram names
Next Topic:Description Tab with M2DOC
Goto Forum:
  


Current Time: Thu Mar 28 22:48:24 GMT 2024

Powered by FUDForum. Page generated in 0.02523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top