Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: _lauras on February 22, 2007, 11:31:00 pm

Title: Get features NOT alphabetically
Post by: _lauras on February 22, 2007, 11:31:00 pm
Hello, I have a small problem using the automation interface. I want to import the attributes not sorted alphabetically. They are always imported alphabetically and I do not know how to import them in the order specified by me. Please help me if you can.
Title: Re: Get features NOT alphabetically
Post by: «Midnight» on February 23, 2007, 05:14:37 am
What do you mean when you say "import?"

Have you opened a diagram properties window and unchecked the sort options? [You can use any diagram, EA will remember the setting after you save the diagram.]
Title: Re: Get features NOT alphabetically
Post by: thomaskilian on February 23, 2007, 01:08:27 pm
This is independent from any import: Tools/Options/Objects/Sort Features Alphabetically
Title: Re: Get features NOT alphabetically
Post by: _lauras on February 26, 2007, 04:19:12 am
Thanks but my problem is when I try to get information from EA from a programming language. For example if I do the following:

do i = 0 to hClass:Attributes:count - 1:
end.

the attributes are taken alphabetically and I do not want this. Please help me if you can.
Title: Re: Get features NOT alphabetically
Post by: thomaskilian on February 27, 2007, 02:46:01 am
That leaves me more puzzled than before ???

Maybe you mean the Attribute.POS property. That contains the ordering from the browser.
Title: Re: Get features NOT alphabetically
Post by: jkorman on February 27, 2007, 11:26:46 am
Think I've found it....

You'll need to sort your attribute collection using

attribute.getPos()

So that the retrieval matches the "display order."

Jim

P.S.

Thomas, when I re-read your last post, realized that we were saying the same thing. I'm using the Java API and am not used to using "properties" anymore.