Author Topic: Standardising Element Appearance  (Read 5225 times)

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Standardising Element Appearance
« on: November 22, 2016, 01:31:00 am »
This may have been raised before, not sure.

If I use the "Project Template Package" approach provided in EA I can set my own appearance for elements (font colour, size, border, background etc..) without using the 'default appearance' option, and this works fine.  EA notices the custom appearance in the template section and applies that style to a new element of the relevant type that I add to a diagram.   The problem is that this seems to be a one time operation.   By that I mean, if I re-use (link to) that element on a different diagram, a completely different appearance is applied, which I assume must be the default for the element.   I can of course also set the "default appearance" of the element, essentially repeating the changes made to customise the element in the template package, but why do I have to do this twice? Is this a bug? 

Would it be reasonable to expect that on re-use of an element, either
1) EA also applies the style it finds in the template package - if it looked that is, I have a feeling the lookup on the template package only happens for new elements.   In short shouldn't the style I specify in the template package override any default appearance ?
2) When an element is defined in a template package and its appearance changed, shouldn't then its 'default appearance' automatically be updated to reflect those changes?

thanks

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8066
  • Karma: +118/-20
    • View Profile
Re: Standardising Element Appearance
« Reply #1 on: November 22, 2016, 08:41:56 am »
http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/using_element_templates.html
Quote
When you are creating a new element, the system checks for that element type in the Templates Package and, if it finds that element type, will copy the template element as defined. The definition includes any default display options of the template element, so you can apply the template definition and switch to the default appearance for the new element, if you prefer.
The documentation is clear that this is on creation.

What's the aversion to using default appearance? If you set the default appearance of your element in the template package, that would apply on all future diagrams the elements are used on.

You can also use a stereotype with a defined color. That color will then be set as a level of default below the default element appearance. (Or if you shape script, set a color and call drawnativeshape it's between local color and default color.)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Standardising Element Appearance
« Reply #2 on: November 22, 2016, 09:32:24 am »
tl;dr : use F4 to set colour in template package.
The Sparx Team
[email protected]

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Standardising Element Appearance
« Reply #3 on: November 23, 2016, 12:03:49 am »
The documentation is clear that this is on creation.
Agreed.

What's the aversion to using default appearance? If you set the default appearance of your element in the template package, that would apply on all future diagrams the elements are used on.

No aversion, it's just that it's easy to click on the element and use the Format Toolbar from the element icons to change the appearance in the template package.  This then works for new elements,  but in fact in the template package what you should be doing is changing the default appearance in order to get consistency for new elements and re-used elements.   The "Change Default Appearance" menu option is somewhat hidden (in comparison to the Format Toolbar icon) and not everyone knows about F4.