8. Bits and Pieces

8.1 Ordering of Collections

You will find that the ordering of collections does not match that you find in EA’s project browser. Most objects have a Pos or a TPos property. Only if this is non-zero it is valid and supersedes the occurrence in the collection. Also you will find that the browser has some rules to internally group packages, diagrams and elements. Further there is a Sort Features Alphabetically option under Tools/Options/General which interferes. So if you need the same ordering as in the browser you have to code a bit.

8.2 GUID

A GUID (Global Unique ID) has the general format

{XXXXXXXX-XXXX-xxxx-XXXX-XXXXXXXXXXXX}

where XX is a hex code with upper case chars and xx one with lower case. A GUID in contrast to other object IDs in EA is (as the name suggests) unique16 all over the world. There are a couple of Get<what>ByGUID operations available for the Repository class. The <what> can be Package, Element, Attribute, Method and Connector.

There’s a bit of magic in some GUID especially with that of tagged values17.

… omitted …