Book a Demo

Author Topic: change / add a new note type with some changes using scripting.  (Read 3761 times)

jimmym

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
change / add a new note type with some changes using scripting.
« on: October 03, 2018, 03:26:26 pm »
Hi,
I am fairly new to EA, and wondered if it would be possible to change the default note drawing.
I would like the pin moved to the right, and the text centered, is that possible using scripting?
If I have to choose a stereotype, I would rather it not be drawn on the note.
How would I go about changing this to center the text, and move the pin to the top left corner?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: change / add a new note type with some changes using scripting.
« Reply #1 on: October 03, 2018, 03:31:26 pm »
I don't think you can change that.
The only alternative would be to write your own shapescript reproducing the same shape.
Seems like a rather simple shapescript would suffice.
Then you can attach that shapescript to a stereotype of you own.

Geert

jimmym

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: change / add a new note type with some changes using scripting.
« Reply #2 on: October 03, 2018, 03:58:59 pm »
That's a great suggestion... how would I go about doing it?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: change / add a new note type with some changes using scripting.
« Reply #3 on: October 03, 2018, 04:09:31 pm »
Check the help here: https://www.sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/shape_editor_2.html
The easiest to start is to define you own stereotype in the model and then add the shapescript there.

Once you are satisfied with the result you can go a step further and create your own UML profile and deploy that with an MDG.

If you are looking for more example script see here: https://github.com/GeertBellekens/Enterprise-Architect-Shapescript-Library

Geert



qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: change / add a new note type with some changes using scripting.
« Reply #4 on: October 03, 2018, 05:55:36 pm »
I'd guess you'll have a hard time mimicking the pin (as shown) with shape script. It has only limited graphical abilities.

q.