M2Doc and Capella 1.3.1: Unable to work with diagram

Hi,

Since a wanted to mange diagram with M2Doc in Capella 1.3.1, I wrote the following statements:

{m:let diagrams = self.containedLogicalArchitectures…ownedLogicalComponent->select(lc | lc.name = ‘Logical System’).representationByDescriptionName(‘Logical Architecture Blank’)}
{m:for d | diagrams}
{m:d.name}
{m:endfor}
{m:endlet}

Unfortunately, this code raised the following error :

{m:d.name} Invalid query statement: Attempt to access feature (name) on a non ModelObject value (interface org.eclipse.sirius.viewpoint.DRepresentation).

Please what is the right way to handle diagram with M2Doc in Capella 1.3.1?

Valery

This is the right way but you need to add Sririus EPackages to your template since DRepresentation is defined by Sirius. You can use the template properties wizard and using the nsURI tab to add all nsURI containing “sirius”.

Hi Yvan,

Its works, thanks.

Valery