Hi all!
I am looking for a way to display diagrams that contains requirements previously filtered.
The solution I used works like a charm on capella 5.0 running with on,e of the last version of M2Doc, unfortunately I have to make it work on Capella 1.3.2 and on this version, it does not work.
I use the following line to loops through the diagrams owned by the requirements:
{m:for Rep | viewpoint::DRepresentation.allInstances() -> select(r | r.representationElements -> select(re | if re.oclIsKindOf(diagram::DDiagramElement) then re.visible else true endif).target -> collect(e| if e.oclIsKindOf(cs::Part) then e.type else e endif) -> includes(Req))}
Req being defined as :
{m:for Req | self.containedSystemAnalysis.eAllContents()-> filter(Requirements::Requirement) -> select(r|r.ownedAttributes -> size() <>0)}
The loop through the requirements doesn’t give any errors, I have used this loop before. The problem only lies with the representation part. I also tried to go with a self.eAllContents( viewpoint::DRepresentation) but it does not work either, the error message is very similar.
This is what the validation file gives me:
If someone has an idea I would be really grateful !
Thanks in advance