Capability and contextual architecture

To contextualy generate my documentation (M2DOC) for every capabilities, I would like to get the architectural diagrams (OAB, SAB…) contextual to the capabilities. Is that possible? Do I have to use the field “Element of Interest”? How it works?
Thank you in advance.

Definitely interested in that too !
As per my understanding, the “element of Interest” was added for that purpose:
"The purpose of this work is to provide a new relation called “Elements of Interest” between diagrams and model elements for navigation and documentation purpose "
From the source code:
If you can list DAnnotation refereing to a specific element of the model, you could get back to the diagrams using .eContainer() I think.

From a Diagram -> Element of model:
Trying to get to do the opposite now …

Thank you !
But the difficult part is to get the related DReprestationDescriptor of the DRepresentation (which is return by the representationByDescriptionName sirius service).

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