Book a Demo

Author Topic: detail info about element  (Read 6847 times)

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
detail info about element
« on: August 10, 2009, 07:18:55 pm »
Hi,

I was wondering if there is a way in EA API, how to get very detail information about a particular element in model. I would like avoid to hard-coding that form a ground ....

thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: detail info about element
« Reply #1 on: August 10, 2009, 08:56:08 pm »
Like all good things this depends on what you want. Can you be more specific?
No, you can't have it!

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: detail info about element
« Reply #2 on: August 10, 2009, 09:05:30 pm »
It would be nice to get as a string following properties:
name, steretotype, GUID, ID, all connectors, ClassifierID, Files, ... just everything ...

Let us say for debugging purposes ...  ;)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: detail info about element
« Reply #3 on: August 10, 2009, 09:36:39 pm »
Not as far as I know.
I'm afraid you'll have to do the legwork yourself  ;)

Geert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: detail info about element
« Reply #4 on: August 11, 2009, 03:34:11 am »
But you can obtain that information without having to go beyond the API.
No, you can't have it!

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: detail info about element
« Reply #5 on: August 11, 2009, 06:30:55 am »
what do you mean Midnight?
« Last Edit: August 11, 2009, 06:31:19 am by xhanness »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: detail info about element
« Reply #6 on: August 11, 2009, 06:37:29 am »
I mean that although you have to write some API calls to get the information it should all be there. You won't have to write more 'exotic' code to (for example) open the background DBMS to extract and parse the data records.

You can write yourself a small helper library (if your programming platform allows this) with a few helper methods. These could grab the core properties common to all (or most) element types. Then you could access these as properties of one of your helper classes, or something like a combined string (perhaps an XML fragment or something). This would encapsulate your code so you'd only have to debug it once. It would also reduce the number of calls to the EA API by replacing these with a more 'friendly' call to your helper. You might even package the initial property retrieval into a constructor of the helper class.

HTH, David

NOTE: For most paradigms you will want to release the reference to the EA instance once your helper object has the data. Failing to do so can make for some messy side effects since EA uses the COM paradigm.
« Last Edit: August 11, 2009, 06:39:01 am by Midnight »
No, you can't have it!