Book a Demo

Author Topic: Shape scripts and profiles incompatible?  (Read 12436 times)

Kimi

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Shape scripts and profiles incompatible?
« on: June 22, 2012, 09:57:37 pm »
Hello

I have a GUIElement metaclass extended by a stereotype TextArea. The TextArea has an enum value attached (e.g. DataLine_1, DataLine_2). Now I have a "screen" set up with labels using these stereotypes. Since I want a different layout, I changed the appearance of my TextArea stereotype using a shape script (transparent and print "#name#").

But if I add another element to the enum definition I have to reimport my profile ... and my shape script is gone! Why is that?
Is there some way to avoid this?
I actually do not like the idea to have to redefine all shape scripts or other settings each time I have to update the profile.

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Shape scripts and profiles incompatible?
« Reply #1 on: June 22, 2012, 10:20:55 pm »
You should define your shape script at the stereotype in the profile, otherwise it will be overwritten/cleared when you reimport the profile (and thus the stereotypes).

HTH
Günther

Kimi

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Shape scripts and profiles incompatible?
« Reply #2 on: June 22, 2012, 10:34:54 pm »
Thanks for the reply, but can you elaborate that?
For Shape Script/Appearance definition I do only know the menu "Settings -> UML Types". And there: Select the required stereotype and set "Shape Script" below heading 'Override Appearance'.
Is there another place to do that?

When saving the profile that I then have to import into the resources, I have "Color and Appearance" included.
I guess unselecting that same point upon import would fix my problem but it feels, like that is not the way it is intended, since it would also affect other aspects that I might want to import.

Regards
Michael

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Shape scripts and profiles incompatible?
« Reply #3 on: June 23, 2012, 12:30:58 am »
You can place a shape script in the stereotype definition in your profile giving the stereotype an _image attribute and set it's initial value.

This section in EAs help explains it:
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/standard_uml_models/add_shape_scripts_to_uml_profi.html

I don't know the behavior if you just define stereotypes in the UML->Settings and export these as reference data, but I would expect that shape scripts applied to these should be exported/imported as well.

Kimi

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Shape scripts and profiles incompatible?
« Reply #4 on: June 26, 2012, 08:12:07 pm »
Thanks. Now I have got it working.
It is just a pity that you cannot set font color and style in the shape script.