Book a Demo

Author Topic: Ordering of Attributes in an Enumeration  (Read 2893 times)

shortnr

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Ordering of Attributes in an Enumeration
« on: August 22, 2022, 02:56:38 pm »
Hi! I'm working on a project to model the architecture of some software being developed at my job, and I decided to script the creation of Components by parsing header files and generating structs/enums/function lists in EA as necessary.

When I create all of these by hand, the Attributes for Enumerations appear in the order that they are added (when the Enumeration is dropped into a diagram). When I create them programmatically, the Attributes get sorted alphabetically in the Collection of Attributes (I assume they're stored as a collection).

I've attempted to use the IsOrdered variable for the Attributes, but that doesn't seem to have an effect, and the Collection class doesn't seem to have any variable or method within it to enable/disable alphabetical sorting.

Any assistance would be appreciated!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Ordering of Attributes in an Enumeration
« Reply #1 on: August 22, 2022, 05:50:57 pm »
You have to use the property EA.Attribute.Pos to set a custom order.

Geert