Author Topic: How To: Import Matrix and Generate Message diagram  (Read 2378 times)

tim-southerland

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
How To: Import Matrix and Generate Message diagram
« on: September 16, 2010, 05:00:44 am »
Where would I begin if I wanted to automatically import a matrix (.csv) that described a large array of BPMN message flows/ activities?

Ultimately, I would like to generate a BPMN diagram from the imported data.  

I'm new to Sparx EA & its automation features. I am a system integrator with java, VB and C++ software development background.
« Last Edit: September 16, 2010, 05:06:26 am by southerlandt »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13233
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How To: Import Matrix and Generate Message dia
« Reply #1 on: September 16, 2010, 03:28:49 pm »
Tim,

I would first look at some addin examples.
There are basically three locations to find those:
- the community site, the excel vba importer might give you some inspiration
- The resources section of the main website
- The examples provided with the installation at C:\Program Files\Sparx Systems\EA\Code Samples

If you run into trouble, use the left top "search" in this forum. There are a lot of question with useful answers about all things API.

Have fun

Geert

tim-southerland

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: How To: Import Matrix and Generate Message dia
« Reply #2 on: September 17, 2010, 05:47:45 am »
Thanks Geert,
 
I saw your VBA example.  Unfortunately, I don't have excel loaded on the modeling machine so I am unable to utilize an automation interface using VBA. From what I can tell, this means that I will need to write an EA script, develop an add-in or develop an external application that interfaces with the EA activeX objects,

I'm looking for examples that demonstrate a way to import a .csv with VBscript and an example that manipulates connectors.   (most local script examples demonstrate manipulate of elements other than connectors).  I found that one of the C# examples located in "..\Sparx\EA\CodeSamples\C#_Samples"  that has some file I/O functionality and some code that manipulates connectors.  This would be a good place to start, but I've run into some hiccups.

I have Visual Studio C# express 2010 w/ .Net v4.  Is the Automation Interface (interop.ea.dll) compatible with this version?  Seems like the code examples are unable to find essential objects in referenced .dlls.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13233
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How To: Import Matrix and Generate Message dia
« Reply #3 on: September 17, 2010, 01:13:32 pm »
Tim,

I've used that same version of visual studio before to create EA addins, so that can't be the problem.
What issues are you facing exactly? Maybe a code sample could help to see what is going wrong.

Geert