Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: david.jehoul on June 24, 2005, 06:07:38 am

Title: Element usage in Automation Interface
Post by: david.jehoul on June 24, 2005, 06:07:38 am
Hi,

does anybody know whether an equivalent to the interface 'usage' command (select an element, right-click) exists in the automation interface? I couldn'd find it in the reference documentation of the automation interface.

Thanks,
David
Title: Re: Element usage in Automation Interface
Post by: thomaskilian on June 24, 2005, 07:59:29 am
There's a property Diagrams() which might give what you need (haven't tested that).
Title: Re: Element usage in Automation Interface
Post by: david.jehoul on June 28, 2005, 02:03:07 am
Mmm, in the help-file it says "Read only. Returns a collection of sub-diagrams attached this element as seen in the tree view. "; so that's not what I'm looking for...
Title: Re: Element usage in Automation Interface
Post by: thomaskilian on June 28, 2005, 04:55:02 am
What else do expect if not the diagrams where the element is used. Since this is what Usage (Ctrl-U) returns. ???
Title: Re: Element usage in Automation Interface
Post by: david.jehoul on June 28, 2005, 07:25:20 am
Well, the "diagrams" command returns the diagrams that are part of the element (sub-diagram in the project tree). "Usage" gives you the diagrams on which the element is put as a view. So this is something completely different.

David
Title: Re: Element usage in Automation Interface
Post by: thomaskilian on June 28, 2005, 07:33:48 am
Oh :-[
Got the link in the wrong direction.

I guess you have to go through all Diagrams and there through DiagramObjects() to locate the element.
Title: Re: Element usage in Automation Interface
Post by: david.jehoul on June 28, 2005, 02:56:09 pm
yep, that is a solution. I implemented it in that way, but the problem is that the process is becoming very slow if you have a big repository. On the other hand, if you use the "usage ..." function in the EA user interface, the result is 'lightning fast'. So fast that I cannot believe that they do it in this way. So there must be a better way. I already asked them how they do it, but haven't received an answer yet.
Title: Re: Element usage in Automation Interface
Post by: thomaskilian on June 29, 2005, 01:13:03 am
Probably not all of the manually executable functions are exposed in the COM interface :'(