Book a Demo

Author Topic: Set default notes for newly created elements  (Read 13960 times)

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Set default notes for newly created elements
« on: August 16, 2011, 05:42:05 pm »
In our UML profile we defined a stereotype "Invariant" based on the metaclass Requirement.
Is it possible to set a "default comment" for elements based on a stereotype?

I thought of extending the shape script in some way. Currently we display the notes of such an element with the shape script command printwrapped("#notes#"). But this simplay takes the notes that the user enters for the element.
I want to set a default note that may be edited by the user.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Set default notes for newly created elements
« Reply #1 on: August 16, 2011, 06:14:33 pm »
You can use the template package to add a default comment.

Geert

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Re: Set default notes for newly created elements
« Reply #2 on: August 16, 2011, 07:30:40 pm »
Quite a helpful feature. Up to now I didn't even know that there is something like a "template package".
Thanks for the help.

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Re: Set default notes for newly created elements
« Reply #3 on: December 14, 2012, 01:21:48 am »
Since months the "template package" does not work any more :(.

I tried
- reset the template package (set to another package and set it back to the real template package)
- disconnect the template package from package control (template was under version control in ClearCase up to now)
- reimport our custom UML profile

Nothing helped. Whenever I create a new element, that has a template in the template package, the default "note" text is ignored.

As the newly created element has a "customized" stereotype with a customized shape script I fear this has to to with the problem. But I wonder why it worked for over a year until September 2012.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Set default notes for newly created elements
« Reply #4 on: December 14, 2012, 08:47:52 am »
Quote
As the newly created element has a "customized" stereotype with a customized shape script I fear this has to to with the problem.
Add a stereotyped element to the diagram in the template package...
The Sparx Team
[email protected]

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Re: Set default notes for newly created elements
« Reply #5 on: December 18, 2012, 11:26:02 pm »
The element in the project template package is already a stereotyped one.

Size and background color are taken from the template. But the element's notes stay blank.