I usually create StandardCharts in diagrams to show completness of elements in diagrams.
Currently I need manually modify my SQL template in every diagram to replace diagram guid, to get their context.
select /*2016.09.07:11.08*/ decode(op.status,
'Complete',
'Complete',
'Verified',
decode(op.priority,
'High',
'Critical',
'Medium',
'Decided',
null),
null) "Series",
nvl(op.problem, 'NotSet') "GroupName",
o.name,
o.stereotype,
o.object_type
from ea.t_diagram d, ea.t_object o, ea.t_diagramobjects do
left outer join ea.t_objectproblems op
on do.object_id = op.object_id
where d.ea_guid = '#DiagramGUID#'
and do.diagram_id = d.diagram_id
and (op.problem in ('CustomProblem') or op.object_id is null)
and o.object_id = do.object_id
and (o.object_type not in ('Note', 'Boundary', 'Text') and
not (o.object_type = 'Class' and o.stereotype = 'Chart'))