Hi
I'm trying to create a derived property in the requirements list editor to display where a requirement is contained on a diagram.
I current have the code:
let diagrams:Sequence(notation::Diagram) = self.mediniGetOpposites('element')->selectByType(notation::Shape).diagram->selectByType(notation::Diagram)
in projectmodel::PJDiagram.allInstances()->select(d | (diagrams->includes(d.oclAsType(projectmodel::PJDiagram).diagram) ))) This gets me all the diagrams that a requirement is displayed on, but I would like to further filter the results to a certain area of the model. I have tried the code below, but it does not yield any results.
let diagrams:Sequence(notation::Diagram) = self.mediniGetOpposites('element')->selectByType(notation::Shape).diagram->selectByType(notation::Diagram)
in projectmodel::PJDiagram.allInstances()->select(d | (diagrams->includes(d.oclAsType(projectmodel::PJDiagram).diagram) and (d.canvasElement.oclAsType(sysml::SysMLContainerPackage).name.matches('System Model System Architecture Design & TSC') ))) It's probably a misunderstanding how to use the oclAsType method, but any guidance would be much appreciated!