Author Topic: EADIS - Diagram Image Server via API?  (Read 2661 times)

RIL

  • EA User
  • **
  • Posts: 142
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
EADIS - Diagram Image Server via API?
« on: January 20, 2013, 08:46:20 am »
Diagram Image Generator - Is it possible to (via API) fill in scenario lists and from the scenario autogenerate a flowmodel (this should be possible) and then - and this is my Q - fetch an image of the flow diagram to be used outside of EA?

 - Has someone already tried anything like that? That is, an EADI Server.  ::)

What for? - What I'd like to achieve is using EA to provide with some diagrams based on legacy excel data, where it would make sense to let Excel export and populate Steps for Scenarios and get back the autogenerated flow diagrams. Or, of course, the images of the diagrams.

// Rolf Lampa
« Last Edit: January 20, 2013, 09:18:39 am by Rolf_Lampa »
-- There's always a solution --

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +3/-0
    • View Profile
Re: EADIS - Diagram Image Server via API?
« Reply #1 on: January 20, 2013, 12:48:38 pm »
This is a script I was also planning to create for the same reason.

To populate the scenarios.

Create scenario by adding a EA.scenario to Element.scenarios
Create a scenario step by adding a EA.ScenarioStep to the EA.scenario.steps

For auto generating the diagram,
Project.GenerateDiagramFromScenario()

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/project_2.html

I'd post my script but I make heavy use of a custom library I've created so I can add EA objects to other EA objects with a simple createChild function.

Good luck.

RIL

  • EA User
  • **
  • Posts: 142
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
Re: EADIS - Diagram Image Server via API?
« Reply #2 on: January 20, 2013, 08:08:12 pm »
Hi Steve,

Yes, thank you for this hint! This is exactly what I'd like to do.

What remains unclear to me is whether it's possible to get back from EA an image of the autogenerated diagram, say a <flowdiagram>.png or <flowdiagram>.jpg, for use ouside of EA, for example for display inside Excel or any other application using EA as a "diagram server".

Regards,

// Rolf Lampa
« Last Edit: January 20, 2013, 08:09:10 pm by Rolf_Lampa »
-- There's always a solution --

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EADIS - Diagram Image Server via API?
« Reply #3 on: January 21, 2013, 06:42:46 pm »
The project interface has two operations for that:

PutDiagramImageOnClipboard
and
PutDiagramImageToFile

Geert

RIL

  • EA User
  • **
  • Posts: 142
  • Karma: +3/-0
  • -- There's always a solution --
    • View Profile
Re: EADIS - Diagram Image Server via API?
« Reply #4 on: January 21, 2013, 08:22:36 pm »

There we go, eaxctly what I was looking for. Thank you for that!

Regards,
// Rolf Lampa
-- There's always a solution --