6.6.2 Outputting element symbol
nesting
To output the object(s) that contain the current
object’s or relationship’s symbol use:
containers
which answers the objects whose
representations contain the first (from back to front) representation of the
current object or relationship, in the oldest diagram representation of the
current graph. The elements are sorted by area (smallest first), then by normal
sorting order (type, id, oid).
Similarly, to output the objects contained in the current
object’s symbol use:
contents
The elements are sorted by area (largest
first), then by normal sorting order (type, id, oid).
These commands can also be used as the basis of a
do or
dowhile loop, e.g.
do containers.
Note that
containers and
contents have special semantics when
iterating over properties with
do :()
– see Section
6.3.6. Similarly,
contents has special semantics when
iterating over lines of a Text that has Live Code links to model elements
– see ‘
Iterating over texts as
collections of objects’ in Section
6.3.5.