M2Doc Missions capabilities Blank

Inspired by what I do in order to display Data Flow blank diagrams, I tried that command in my M2Doc template :
{m:for im | self.containedSystemAnalysis.containedCapabilityPkg.ownedCap abilities.representationByDescriptionName(‘Missions Capabilities Blank’)}
{m:im.asImage().fit(500,400) }.
But, even after trying other variations, i did not succeed to display the ‘Missions Capabilities Blank’
Has someone already succeed in it ?

In a generic way, in order to get a diagram with M2Doc, you need to navigate to the model elements which contains the diagram (in the Capella project explorer) and then use the “representationByDescriptionName” query.
If you have a look in Capella, you will see that the MCB diagrams are contained within the Capability package of the System Analysis (see capture enclosed).
In the queries you are using, you are navigating to the capabilities contained within the capability package (you are going one step too far).
So if you use the following query, your problem should be solved:
{m:for im | self.containedSystemAnalysis.containedCapabilityPkg.represen tationByDescriptionName(‘Missions Capabilities Blank’)}

Thank you Aurelien, it answers my question perfectly.

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.