Author Topic: How to create index of project  (Read 4311 times)

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
How to create index of project
« on: March 05, 2021, 09:45:59 pm »
Hi all,

I'm using EA to develop a complex system and in some part I would like to add an index of content inside the main page topic.

Let me explain better: imagine that I have this package structure:

 - Project CAR manufacturer
|
 --> Main page (this is a package diagram that reflects the project structure)
|
 --> "Motor"
        |
         --> "Cylinders"
        |
         --> "Gears"
|
 --> "Behaviors"
        |
         --> "Start"
        |
         --> "Stop"

I would like in the main page a sort of table of content that contains hyperlinks to each sub-diagram that reflect also hierarchy

Is there a way to implement this?

Thank you so much in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to create index of project
« Reply #1 on: March 05, 2021, 09:57:15 pm »
You can definitely do that manually, by dragging diagrams to your index diagram, and select "as hyperlink".

It's also possible to automate that with a little script.
If you are familiar with scripting in EA that's not more than an hour or two of work.

Geert

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
Re: How to create index of project
« Reply #2 on: March 05, 2021, 10:27:31 pm »
So far I did it manually, but I would like to do it with a little script.

Could you indicate me a simple way to do this? (also linking a documentation on how to write script in EA).


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to create index of project
« Reply #3 on: March 05, 2021, 11:40:10 pm »
scripting documentation can be found here: https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/automation/the_scripter_window.html

A bunch of example code here: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library

In this case you would need to traverse your model, and add hyperlinks to your index diagram.

To create a hyperlink to a diagram, on a diagram, you first need to create the hyperlink element Package.Elements.AddNew() and then create a new DiagramObject referencing your hyperlink element using Diagram.DiagramObjects.AddNew()


Geert


philchudley

  • EA User
  • **
  • Posts: 744
  • Karma: +21/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: How to create index of project
« Reply #4 on: March 06, 2021, 02:24:52 am »
You also take a look at my Sparx Community article

https://community.sparxsystems.com/tutorials/1258-navigable-html-publication

Which is about creating Navigable models, primarily for HTML output, but the principle of structuring the browser, creating index pages and creating links to diagrams  can be applied to your situation

There is an issue with the website which is serving up the images for this article, but my email address is at the bottom of the article, so please contact me if want a copy of the original document complete with images

Phil
Models are great!
Correct models are even greater!