Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Shegit Brahm on November 09, 2021, 02:34:36 am

Title: Addin that "animates" a walk through of an activity diagram
Post by: Shegit Brahm on November 09, 2021, 02:34:36 am
Hi there,

I'm sorry for a rather complex question instead of a single problem. I just hope my main problem lies only in the beginning.

What do I want to achieve?

So I click and thus decide which element to colourize, the EA does so and jumps around the diagram to show me this - and when I'm done all colour is gone.

What do I already have?

Some alternatives/extras

So, I know how to read and set the colour of an element "in general" (explored the data model of .eap). I see that the EA jumps to an element in diagrams with e.g. "locate in current diagram" - and knows if the element is visible on my screen or not. The current addin is a modal dialog. Which is no problem to just relocate the addin on a second screen to see the diagram. Maybe that is even safer because the elements cannot be manipulated manually = diagram stays at is. Being unaware of existing "walk throughs" I also consider the "which AD to select in the first place" worth to create my own addin.

Starting questions

Thanks,
Shegit

my example:
start (https://i.stack.imgur.com/fD9Qb.png) -> (https://i.stack.imgur.com/j4uiD.png) -> (https://i.stack.imgur.com/WYVz6.png) -> (https://i.stack.imgur.com/lMeAZ.png) -> (https://i.stack.imgur.com/0tkEO.png)
Title: Re: Addin that "animates" a walk through of an activity diagram
Post by: qwerty on November 09, 2021, 03:31:42 am
I don't think you get that to an acceptable level. The problem I see is that you might run into having to reload diagrams quite often to make your changes visible. I doubt that placing a feature request for a life update of single elements has good chances. This is just my feeling about what you try. Maybe you find bypasses. But I really doubt that.

q.

P.S. Not sure if EA has already something like that in some upper licenses.
Title: Re: Addin that "animates" a walk through of an activity diagram
Post by: Geert Bellekens on November 09, 2021, 05:31:28 am
You seem to want to recreate the simulation feature of EA in some kind of way.

I've never actually used the build in activity diagram simulation, but maybe that already solves your problem.

If not I'm afraid you are in for a rough ride.
Highlighting things on a diagram is not easily done using the API, and neither is scrolling a diagram. You can select an element, or a diagram, but that doesn't always work that reliable.

Another option might be to change the color/thickness of the borders of your elements an connectors, but you might need to reload the whole diagram to show that, which would not make it look fluid.

But there is support for the simulation. Maybe that can help.
https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/automation/automation_simulation2.html (https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/automation/automation_simulation2.html)

Geert
Title: Re: Addin that "animates" a walk through of an activity diagram
Post by: Shegit Brahm on November 09, 2021, 10:27:07 pm
Thank you for your hints.
While searching I somehow overlooked the buildin feature. Yet it does not fully meet my requirements - which is rooted in the meta stuff the addin is used for. (There the user has to make each step a decision how the current action worked out etc.)

And yes, I was considering to change only colour & thickness of the element's border as "highlighting". (Because I already found ways to do it and I wanted at least two colours anyway)

At first glance it might not need look fluid as it is clickwise anyway.

So I take home "save and refresh" is very likely needed - and maybe not always reliable. Especially the "show that element".
And once there is a decision to upgrad EA I for sure take a look at the new simulation feature.

Thanks for your time,
Shegit.
Title: Re: Addin that "animates" a walk through of an activity diagram
Post by: Eve on November 10, 2021, 08:49:12 am
There is Diagram.FilterElements which you can use. It will give you a highlight style effectively the same as the simulation.