Book a Demo

Author Topic: Information Items and Shape Script  (Read 4007 times)

Richard D Vodden

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Information Items and Shape Script
« on: May 31, 2014, 12:23:32 am »
Hey,

I really don't like the way that EA by default does not include a new line between "Information Items Conveyed" on an "Information Flow" arrow when they're displayed in the Middle Top Label. I'm trying to override this behaviour using a Shape Script, but I cannot work out how to get access to the list of "Information Items Conveyed" through the Shape Script API. Does anyone have any ideas?

Thanks,

Richard.

DanF

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Information Items and Shape Script
« Reply #1 on: June 11, 2014, 12:44:46 am »
Hey,

did you manage to access the list of "Information Items Conveyed" via the script editor?

I would be interested in a way to access them by script or any other way
« Last Edit: June 11, 2014, 12:46:15 am by DanF »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Information Items and Shape Script
« Reply #2 on: June 11, 2014, 08:48:24 am »
I guess you're simply lost here. Shape script is very, very limited in its capabilities to access more than the predefined attributes. The transformation script has an exec_add_in but shape script (for whatever reason!??!) has no such escape.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Information Items and Shape Script
« Reply #3 on: June 11, 2014, 08:58:41 am »
Quote
The transformation script has an exec_add_in but shape script (for whatever reason!??!) has no such escape.
Have you actually read the help before making that assertion?

See the third last example at: http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/example_scripts.html

(That page is clearer about how to do it than the element/connector properties page)

Having said that, it's not really recommended (by me.) The function takes a guid. That means at a minimum you're going to need to remove the object, and if I remember correctly it's called on each draw. (ie. slow city if you use it)


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Information Items and Shape Script
« Reply #4 on: June 11, 2014, 07:46:35 pm »
Ah sh... I remembered having read something along those lines but could not find it again as I was looking for "Exec_add_in", not for "#addin". Well, consistency....

q.