Author Topic: Common Property On All Object Types  (Read 3067 times)

ramhog69

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Common Property On All Object Types
« on: October 09, 2008, 08:06:13 am »
I am trying to create different types of objects (packages, diagrams, links) in an EA Model through automation.  I would like to tag all of the objects with a value saying it was created through the automation program.  I have so far been unlucky in finding a property that is available on all object types.  It would be nice if there was a way to create a custom attribute in the automation.  The value created does not need to be visible in the EA UI.  It just needs to be accessible in the automation program.  Is there a way to add a custom property for any object type?  Is there a better way to do this?

Thank you.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Common Property On All Object Types
« Reply #1 on: October 09, 2008, 10:03:11 am »
Perhaps a custom tagged value would work. It would be visible when the Tagged Values window was open, but you did say it "need not" be visible, not that it could not be.
No, you can't have it!

ramhog69

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Common Property On All Object Types
« Reply #2 on: October 09, 2008, 10:13:52 pm »
Thank you very much for the reply.
I considered the Tagged Value but I couldn't see a way to create a tagged value for a diagram.  It looks like this is the only type of object that doesn't support tagged values.  I also looked at Custom Properties, but the diagram doesn't support those either.

Kalvin

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Common Property On All Object Types
« Reply #3 on: October 10, 2008, 03:09:59 am »
Hi Kalvin,

You seem to be on the hook for diagrams. I think I remember some discussion with Sparx, here on the forum, that seemed to indicate they were going to beef up diagrams a bit. If memory serves - I could be very wrong about this, so search and check yourself if it might be applicable - the discussion revolved around either allowing stereotypes for diagrams, or allowing tagged values for stereotyped diagrams (and thus for any diagram by extension).

Perhaps there's a viable workaround.

I wonder if you could create something like a text element, give it some custom properties, then make it invisible.

Or perhaps a hyperlink. These are customized text elements, so you might have to figure out how to tweak the background properties; that might involve fiddling with the database record directly, but you're already there. A hyperlink can be made invisible, does not have to show any text, and could (I assume) have the same diagram as its target (i.e. do nothing).

While this is not an attribute of the diagram per se, you could come up with a standard naming convention and then check if an applicable link were present on a diagram. It so, you can then read your properties.

In the meantime, make a feature request directly to Sparx. You'll find the appropriate form by clicking the Feature Request link below the Support link near the bottom of any forum page.

David
No, you can't have it!