Inserting Logical Component/Functional Exchanges Scenarios in M2Doc

Hi,
I am new to M2Doc. Using “Template SA Complete” provided along with M2Doc add-on, I was able to insert component/functional exchanges scenarios in “System Analysis” context. However, when I am trying to insert “Logical Architecture” Component/Functional Exchanges Scenarios in my documentation, I am getting the following error:
Feature containedLogicalArchitecture not found in EClass SystemEngineering
The code I used to generate “Logical Architecture” Component/Functional Exchanges Scenarios is as follows:
{m:for scenario | self.containedLogicalArchitecture.containedCapabilityPkg.eAl lContents()- >filter(interaction::Scenario)}
{m:if scenario.isRepresentationDescriptionName(‘Component Exchanges Scenario’)}
{m:scenario.asImageByRepresentationDescriptionName(‘Componen t Exchanges Scenario’)->first().fit(500,400)}
{m:elseif scenario.isRepresentationDescriptionName(‘Functional Scenario’)}
{m:scenario.asImageByRepresentationDescriptionName(‘Function al Scenario’)->first().fit(500,400)}
{m:endif}
{m:endfor}
Please let me know how to rectify this error.
Regards,
zinka

Hello Zinka,
There is several mistakes in your queries:

  • first to get the logical architecture phase you need to use the query “containedLogicalArchitecture
    s” instead of “containedLogicalArchitecture”
  • then, to get the capability package, you need to use the query “containedCapability
    RealizationPkg” instead of “containedCapabilityPkg”
    There is also some misplaced spaces in your code that I think come from copy / paste…
    Please know that you can test your code in Capella using the “Interpreter” view if you are using Capella 1.2 or the “Model request interpreter” view for older versions.
    To open those view, use the menu: Window / Show View / Other.
    In both views, the query will be executed on the element selected in the Project explorer or in a diagram.
    Beware, if you select an element in a diagram you will get a different result because the query will be executed on the graphical element and not on the model element represented by the graphical element.
    Also, some queries (like the filter) are not supported by the older view (the Model request interpreter for Capella 1.1 and older).
    One additional tip: you can use the query .eClass.eAllReferences to get the list of all possible relations from one element
Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.