Book a Demo

Author Topic: Project Template Packages  (Read 6631 times)

Scott Lurton

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Project Template Packages
« on: December 11, 2015, 08:14:59 am »
I'm trying to create a cosmetic standard for my team.
* I created a package
* created a component diagram in that package
* I created elements on that diagram with my cosmetic standards. For example I created a Packaging Component with the background color I want.
* Saved the diagram.
* Went to Settings/Project Template Package...
* Pointed at the package I just created
However....
When I open a component diagram and add a packaging component it will not use the background color that I defined in the package template.

Any ideas?????

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Project Template Packages
« Reply #1 on: December 11, 2015, 08:57:08 am »
I never really used template packages. I recommend you look into MDG.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Project Template Packages
« Reply #2 on: December 11, 2015, 09:18:01 am »
It appears that Project Template doesn't affect packages or packaging components. Nor connectors.
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Project Template Packages
« Reply #3 on: December 11, 2015, 09:23:02 am »
Quote
It appears that Project Template doesn't affect packages or packaging components. Nor connectors.
Hm. I was sure having read a recent post that stated it worked with connectors. My memory might have deceived me, though.

BTW: Neil, your avatar points to http://www.sparxsystems.com/yabbfiles/avatars/file://Users/ncapey/Desktop/New%20folder/systems-guy.png
Unfortunately (I guess) nobody else has access to your desktop.

q.
« Last Edit: December 11, 2015, 09:24:55 am by qwerty »

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Project Template Packages
« Reply #4 on: December 11, 2015, 09:36:57 am »
To have a standard colour palette I use an MDG with shape script that just sets the fill colour and draws the native shape.  I find this much more reliable than other ways of assigning colour.

Code: [Select]
shape main{
      defSize(100,80);
      setfillcolor(220,198,224);
      drawnativeshape();
}

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Project Template Packages
« Reply #5 on: December 11, 2015, 11:26:04 am »
Quote
To have a standard colour palette I use an MDG with shape script that just sets the fill colour and draws the native shape.  I find this much more reliable than other ways of assigning colour.

Code: [Select]
shape main{
      defSize(100,80);
      setfillcolor(220,198,224);
      drawnativeshape();
}
An alternate way is to define the default in the MDG:
                              <Stereotype name="Measure" metatype="Measure" notes="" bgcolor="14938876" fontcolor="16448" bordercolor="0" borderwidth="1" hideicon="0">

This, then, allows the users to better override the shapescript to emphasise some state or other of the vertex.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Project Template Packages
« Reply #6 on: December 11, 2015, 11:34:54 am »
If you're using a shape script to colour a native shape of an element, you should be aware that it overrides the default appearance (F4) of any elements. It can still be overridden using the local appearance (on the diagram toolbar)

In my opinion, a nicer thing to do for your users is set a fill colour on the stereotype. This still provides the default colour for that stereotype, but allows users to overwrite it on all diagrams or on individual diagrams.

The fill colour applied is based on this order, where each item except the first can be suppressed.
Global default -> Element Group Style -> Stereotype Color -> Default Color -> shape script setfillcolor for drawnativeshape -> Local Color -> shape script setfillcolor for explicitly drawn shapes

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Project Template Packages
« Reply #7 on: December 11, 2015, 12:04:00 pm »
Quote
If you're using a shape script to colour a native shape of an element, you should be aware that it overrides the default appearance (F4) of any elements. It can still be overridden using the local appearance (on the diagram toolbar)

In my opinion, a nicer thing to do for your users is set a fill colour on the stereotype. This still provides the default colour for that stereotype, but allows users to overwrite it on all diagrams or on individual diagrams.

The fill colour applied is based on this order, where each item except the first can be suppressed.
Global default -> Element Group Style -> Stereotype Color -> Default Color -> shape script setfillcolor for drawnativeshape -> Local Color -> shape script setfillcolor for explicitly drawn shapes

Doing it that way you get the appearance of the stereotype along with the colour.  There were times I found that that problematic.  And there is also the time you accidently uncheck the box on the profile export and then spend hours trying to work out what is going wrong :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Project Template Packages
« Reply #8 on: December 12, 2015, 12:45:55 am »
Quote
... you accidently uncheck the box on the profile export and then spend hours trying to work out what is going wrong :-)
For that reason I wrote me a short script that assembles the single profiles in the MDG. This is faster (one command line call instead of a dozen clicks/returns) and more safe (I can check the contents of the profiles to be what they pretend to be).

q.