Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: TheTwo on May 21, 2008, 12:53:04 am

Title: How to use the method Repository.WriteOutput
Post by: TheTwo on May 21, 2008, 12:53:04 am
Hi,

I've created my own output tab and put my text to this tab. I've called the the method

Code: [Select]
Repository.WriteOutput("Error Output", errorMessage, id)
errorMessage is a String
id is the ElementID of an Element.

In the EA User Guide the parameter id is described as follows:

It also associates the text in the Output window with the specified ID.

Now everything is listed in the Output, but when I click at one entry the associated element isn't shown at the GUI.

Why that doesn't work?

Thanks

TheTwo
Title: Re: How to use the method Repository.WriteOutput
Post by: Eve on May 21, 2008, 08:19:54 am
It isn't associating an EA ID.  If it was, then you would also need to say what type of ID it was (object/package/attribute/operation/connector/etc).

If you want EA to show an object when clicking on the error then implement the broadcast events EA_OnOutputItemClicked (http://www.sparxsystems.com.au/EAUserGuide/index.html?ea_onoutputitemclicked.htm) and EA_OnOutputItemDoubleClicked (http://www.sparxsystems.com.au/EAUserGuide/index.html?ea_onoutputitemdoubleclicked.htm).
Title: Re: How to use the method Repository.WriteOutput
Post by: TheTwo on May 21, 2008, 07:05:43 pm
Thanks it works, but there is an error in the documentation.

In http://www.sparxsystems.com.au/EAUserGuide/index.html?ea_onoutputitemclicked.htm there is in the signature of the method LineNo As Long, but in the parameter description it is called ID.
Title: Re: How to use the method Repository.WriteOutput
Post by: Eve on May 22, 2008, 08:23:42 am
Thanks.  Although the actual page with the problem is http://www.sparxsystems.com.au/EAUserGuide/index.html?ea_onoutputitemdoubleclicked.htm.  (But I given the way the help hyperlinks work I can understand the error.)
Title: Re: How to use the method Repository.WriteOutput
Post by: RoyC on May 22, 2008, 09:14:36 am
Corrected - the change should be visible with the next release of EA. Thanks for identifying and clarifying the error.