Book a Demo

Author Topic: Adding a link in the generated HTML using the API  (Read 5400 times)

Knightrider

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Adding a link in the generated HTML using the API
« on: August 26, 2016, 11:45:50 pm »
Hi Team EA

I generate quite a lot of component diagrams using the Sparx API by importing all the data from existing Excel spreadsheets into a project. I then save the project as a HTML report. This works fine and I can see all the diagrams in my browser. Next I want each generated HTML diagram to have a clickable link which pops up a new email with some pre-filled parts. This is so people viewing each diagram can send our team feedback on each diagram. This is quite easy to do in HTML but I don't want to edit the HTML in each diagram. How can I add the link using the Visual Basic API when creating the diagrams?

Many thanks in advance.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Adding a link in the generated HTML using the API
« Reply #1 on: August 27, 2016, 12:20:04 am »
How do you create that hyperlink manually?

q.

Knightrider

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Adding a link in the generated HTML using the API
« Reply #2 on: August 27, 2016, 12:27:25 am »
In Html, its simply adding the following line in a htm file where clicking on "Email Mickey" will pop up a new email with the to field populated with Mickeys address.

<a href="mailto:[email protected]"><strong>Email Mickey</strong></a>

Not sure how to add this as a link in Sparx manually to a diagram either.

Thanks

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Adding a link in the generated HTML using the API
« Reply #3 on: August 27, 2016, 01:16:13 am »
Hi,

In Sparx you can edit the HTML templates that are used when generating your html report. Have a look at this link:

http://sparxsystems.com/enterprise_architect_user_guide/12.1/report_generation/webtemplate.html