Obtain Diagram Element from the base elements? (+their attributes)

I have got this simple aql code:

System functions:
{m:for SF|self.eAllContents(ctx::SystemFunction) }
  1. I was wondering if it was possible to get the diagram element associated to one of my system functions?
  2. Extract from that element the coordinates of the said element inside a diagram given. (Let’s suppose the element is displayed in only one diagram)


You will need to create your own Java service to do this. You can try:


To access the GMF Notation model.


Will give you the DDiagramElement.


Will give you the semantic element.


Will give you coordinates and size of the element.

It might be possible with an AQL expression but the service will allow you to walk the Notation model once and cache the result. An AQL expression will need to walk the Notation model many times and will be pretty slow.

1 Like