Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Gomathi on December 23, 2018, 03:27:39 am

Title: Simple VBA Excel to EA importer v3 - Control sorting
Post by: Gomathi 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.
Title: Re: Simple VBA Excel to EA importer v3 - Control sorting
Post by: Geert Bellekens 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
Title: Re: Simple VBA Excel to EA importer v3 - Control sorting
Post by: Gomathi on December 26, 2018, 11:44:43 pm
Thanks, Geert. That worked!