Book a Demo

Author Topic: Shape Script for Stereotype of Constraint  (Read 3107 times)

rainerf

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Shape Script for Stereotype of Constraint
« on: June 21, 2011, 12:53:39 am »
Hi all,

I'm trying to generate a shape script for stereotypes of Constraint. In this script, I can print tagged values of the stereotype (using print("#TAGNAME#")) but I was unable to print the contents of the constraint, ie. what the user can enter after doubleclicking it. Is there some magic #SOMETHING# to print this?

If this is not possible, I would also be fine with adding something below/above/... the default shape (basically, I just want to show some tagged values along with the constraint's content itself), but I was unable to scale what drawnativeshape() draws, ie. it always seems to draw to (100,100) and hence hiding my stuff. Drawing my additional stuff outside (0,0,100,100) works but seems to lead to strange effects with both selecting the item and drawing connectors from it.

Thanks,
Rainer.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Shape Script for Stereotype of Constraint
« Reply #1 on: June 21, 2011, 08:51:27 am »
print("#NOTES#"); should do it.
The Sparx Team
[email protected]

rainerf

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Shape Script for Stereotype of Constraint
« Reply #2 on: June 21, 2011, 05:10:55 pm »
Works great, thanks!