Author Topic: Clickable links in system output window  (Read 4461 times)

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Clickable links in system output window
« on: September 20, 2017, 10:51:58 pm »
Hi,

I'm assuming this is possible - just not sure how. I want to include clickable links (hyperlinks) to model elements and diagrams in the text displayed in the Sparx system output window. Anyone have a VB script example of how to do this ? Any pointers to help/guides ?


Regards,


Jon.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Clickable links in system output window
« Reply #1 on: September 20, 2017, 11:30:52 pm »
See the help: WriteOutput (string Name, string Output, long ID)
    ID: Long - specifies a numeric ID value to associate with this output item for further handling by Add-Ins; can be set to 0 if no handling is required

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13221
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Clickable links in system output window
« Reply #2 on: September 21, 2017, 02:24:46 am »
I think it works even without specific code. If you pass the ElementID then EA will select that element in the project browser upon doubleclicking.

Geert

niko_ea

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Clickable links in system output window
« Reply #3 on: July 04, 2024, 12:38:11 am »
Hi,

I understand this topic is almost 7 years old, but I am experiencing the same issue and haven't been able to resolve it with the existing recommendations. Unfortunately, when I use the Repository.WriteOutput() method in my Add-In and pass the ElementID, EA does not select the element in the project browser upon double-clicking.

In my Add-In, I have various checks that print warnings in a separate tab in the System Output window. For example, one of the checks prints a warning if an element has no connections, like this:
"The element ... has no connections."

What I want to achieve is to either print the element as a hyperlink, similar to how it can be done in the notes, or allow the user to click the OutputItem and be redirected to the element. Unfortunately, I am not sure how to do this.

I would greatly appreciate any suggestions. Thank you very much in advance for your help.

Best regards,
Niko

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13221
  • Karma: +550/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller

niko_ea

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Clickable links in system output window
« Reply #5 on: July 04, 2024, 01:39:49 am »
Thank you very much! Calling Repository.ShowInProjectView() in one of the two functions works as expected!