Book a Demo

Author Topic: Defining a key  (Read 5966 times)

Nonchalant

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Defining a key
« on: December 12, 2006, 03:43:31 am »
is there any way to define a key in EA for colour codes etc?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Defining a key
« Reply #1 on: December 12, 2006, 04:04:56 am »
What do you mean by "key?" Are you talking about a hot key, something like F4 but set to (say) a specific color (rather than going through the dialog)?

Or are you speaking of some means of setting a default color for specific elements (for example)? This could be done through a template package. Look that phrase up in the help file; it is actually quite a useful feature.

Or perhaps you need something else altogether. Please explain and we'll take a whack at answering.

David
No, you can't have it!

Nonchalant

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Defining a key
« Reply #2 on: December 12, 2006, 06:19:51 am »
yes, i should have been more specific, ur 2nd guess was right. i.e.

key
red        borrowed classes
yellow   etc
green    etc

I have just looked at the template package and it seems as I have to create new diagrams in packages but I have created them already?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Defining a key
« Reply #3 on: December 12, 2006, 08:26:14 am »
I don't know of any way you can assign a sequence of actions (something like a macro) to a shortcut key. That would be what you need in this case - to bring up and fill in a dialog - so I think you are out of luck.

If you've created a lot of diagrams, and particularly if you have done this in several models, you might consider a short add-in. You don't need to work magic, you could write something in VBA in a Word document for example. This could enumerate the diagrams, optionally asking for confirmation, and update some or all elements.

The idea of a macro language is interesting. Perhaps you should raise this in a new Requests and Suggestions thread and see if there's much interest. If so, suggest it using the Sparx page you'll find from the EA main menu via Help | On-line Resources | Request-a-Feature.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Defining a key
« Reply #4 on: December 12, 2006, 01:16:00 pm »
I'm not sure of any way to apply formatting like that in bulk apart from using the automation interface.

However, have a look at the 'Format Tool' toolbar for a method of copying the appearance of one element onto others.  Also look into diagram legends (http://www.sparxsystems.com/EAUserGuide/index.html?legends.htm) to show on the diagram what each colour means.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Defining a key
« Reply #5 on: December 12, 2006, 09:10:02 pm »
Thanks Simon,

I'd completely forgotten about the format toolbar.

However, while refreshing my (mythical) memory I noticed that the Copy Format and Paste Format functions don't seem to be documented - or at least indexed - in the help file.

Also, the Format Toolbar page has a circular reference to itself in the See Also section.

David
No, you can't have it!

AshK

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: Defining a key
« Reply #6 on: December 12, 2006, 09:26:24 pm »
the diagram legend symbol available in the UML Elements toolbar may also be of interest.
The Sparx Team
[email protected]

Nonchalant

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Defining a key
« Reply #7 on: December 13, 2006, 02:39:46 am »
why, every Done thankyou for your replies.
Spot on Simon. Excellent.  ;D

potterm

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Defining a key
« Reply #8 on: December 13, 2006, 05:42:26 am »
I think you can do this with stereotypes.  I.e. I think individual stereotypes can be given specific colour settings which are applied when the stereotype is used.  I tried this some time ago and it worked.  However, this doesn't seem to work for stereotypes created as part of a UML profile.  I.e. I recently tried this by defining a number of stereotypes in a profile package, and gave each stereotype specific colour coding (in the hope that this would be translated into colour settings in the resulting stereotypes as part of the applied profile), but it didn't work.

Cheers,
Martin.

EDIT:  Hint, hint - any chance of adding this feature Sparx?
« Last Edit: December 13, 2006, 05:43:46 am by potterm »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Defining a key
« Reply #9 on: December 13, 2006, 01:13:39 pm »
Quote
EDIT:  Hint, hint - any chance of adding this feature Sparx?

It appears that colour information is only set if you 'Configure Default Appearance'.  The colour set by the format bar isn't used.  Oh, and by default colours are not exported with the profile.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Defining a key
« Reply #10 on: December 13, 2006, 01:57:59 pm »
Quote
Oh, and by default colours are not exported with the profile.

Yes, on the Save UML Profile dialog you need to tick the "Color and Appearance" option, and again on the Import UML Profile dialog.

NB to set the colour of a connector stereotype, set the border colour of the stereotype class, not the fill colour.
The Sparx Team
[email protected]

potterm

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Defining a key
« Reply #11 on: December 14, 2006, 01:32:29 am »
Simon/KP,

Thanks for the clarification guys - my mistake  ;)

Cheers,
Martin.