Book a Demo

Author Topic: Link deduction  (Read 5107 times)

fredbeaupre

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Link deduction
« on: April 07, 2009, 04:28:45 am »
Hi,

I am using EA for dependency analysis between multiple packages. Take the following structure of packages:

Package A contains classes A1, A2 and A3
Package B contains classes B1, B2 and B3

For each packages, I have a diagram showing the interactions between my classes. Having all this, I want to get a high level view of the dependencies between all of my packages. For example, if B2 uses A2, is there a way to automatically deduce a link showing that Package B uses Package A?

It would be really usefull to have those links deduce automatically so if I move a class from one package to another, all package links are deduced automatically from their contained classes.

Some help would really be needed.
Thanks
Fred

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Link deduction
« Reply #1 on: April 07, 2009, 05:18:40 am »
If it's like the nesting relationship showing up, then don't hold ya breath to long.

I might be missing judging... create a new package, and to that package add another new pacjage,  Drag the two newly created packages onto a Package Diagram... little cycle with a cross at one end and an arrow at other.

Kevin [smiley=2vrolijk_08.gif]

It should in my opinion be apparent for classes and other bits contained in the package.

fredbeaupre

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Link deduction
« Reply #2 on: April 08, 2009, 11:45:33 pm »
Hi,

The nesting relationship is interesting. I did test what you proposed but it does not give what I want. What I would like to see in the example you mentionned is a way to automatically create the nesting connector when I drop the two packages in a diagram.

If package A contains package B and I drop the two packages on a given package diagram, why isn't there a nesting connector showing up. Having this automatically done gives the advantage of doing live dependency analysis with the relationship matrix window and the hierarchy window when moving elements from one package to another. Right now, I have to edit the connectors by hand and it is a loss of time and very error prone.

Anyone has an idea to help me out?
Frederick

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Link deduction
« Reply #3 on: April 09, 2009, 09:52:30 pm »
No idea how to do it without coding, but it sounds a greate idea.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

fredbeaupre

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Link deduction
« Reply #4 on: April 10, 2009, 03:05:42 am »
If it is not possible to do it within EA as it is in version 7.5. Does somebody knows if I could create connectors with a VB script or a C# add-on. If it is possible it would be appreciated if one could provide a code sample to show how to query existing connectors, create new ones and delete invalid ones.

Thanks,
Frederick

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Link deduction
« Reply #5 on: April 10, 2009, 05:09:19 am »
It is possible and should be rather easy, though I don't have a sample with me now. Any way, you may want to look at the samples EA supplies, they should be in your EA installation folder.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Link deduction
« Reply #6 on: April 10, 2009, 11:09:39 pm »
Hi Frederick,

You can create connectors. I've not tried it via the new Scripting window - check the EA 7.5 documentation - which handles VB Script. You should be able to do it via any method you can find to access COM automation servers via VB Script (there are several).

You can certainly do it with C#. Use the examples in the documentation. You might have to translate the connector creation code from a different language, but there are enough C# examples to show you the general process; the translation should be trivial.

A long-term (and continuing) failure of the EA documentation is the 'missing' list of valid Connector.Type values. You need to open an EA schema, EAP or DBMS, by whatever means you prefer and read the table referenced in the documentation. [There are other similar cases where you need to do this; these have been reported many times, but nothing has changed.] The value you need is "Nesting" (note the capital). You will eventually need others, so check out the table.

You can use many other programming languages. One quick and dirty approach I've used in the past is VBA. This provides a language that was designed from the ground up to communicate with COM applications. It is weakly typed but recognizes COM classes (and helps check program syntax). And you don't need a programming environment. You can just open an application like MS Word - anything that hosts VBA macros and provides a development environment - and away you go.

So take a bit of time to delve into the documentation (again) and look at the examples in the EA Object Model part of the SDK section. You should be fine once you've tried it a bit.

HTH, David

PS: Here's a couple of hints: Make sure you assign an ID to both ends - one end will be done for you, the other you must supply; see the examples - and remember to then call Update() before you do (pretty much) anything else with the connector. These to details will get you past most of the early stumbling blocks.
No, you can't have it!

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Link deduction (VBA use...)
« Reply #7 on: April 11, 2009, 01:14:16 am »
Umm... maybe a silly question, but could I also create-addins using the MS environment for VBA (say Access) vs. say C#?

I am in the midst of learning C# enough to be productive (but I'm actually a pretty good VBA/VB hack.) Most of my previous automation efforts were done using Access connected to the model's database, and using MS Word with VBA code for documentation.

Bioform

Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Link deduction
« Reply #8 on: April 11, 2009, 02:38:18 am »
I did it without really developin any C# before and it was rather easy.
Recursion definition:
If you don’t understand the definition read "Recursion definition".