Book a Demo

Author Topic: Simple VBA Excel to EA importer v3 - Control sorting  (Read 3111 times)

Gomathi

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Simple VBA Excel to EA importer v3 - Control sorting
« on: December 23, 2018, 03:27:39 am »
I'm using Simple VBA Excel to EA importer v3 to import a list of attributes for a class. This tool is very useful (A special thanks to Geert!).
But, when I import, the order of attributes is changed based on alphabetical order.
I checked in the code and didn't see any sorting being performed on the attributes.
The EA options 'Allow free sorting' is checked and 'Sort Features Alphabetically' is unchecked.
Is there any other option that I'm missing?
Thanks in advance.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Simple VBA Excel to EA importer v3 - Control sorting
« Reply #1 on: December 23, 2018, 03:36:53 am »
There's a good chance EA sorts the features alphabetically unless another sort order has been specified.
And since the import code doesn't specify the sort order that is what happens.

If you want you can change the VBA code to set the EA.Attribute.pos to a specific value. That should get your attributes in the order you want.

Geert

Gomathi

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Simple VBA Excel to EA importer v3 - Control sorting
« Reply #2 on: December 26, 2018, 11:44:43 pm »
Thanks, Geert. That worked!