Book a Demo

Author Topic: Add new toolbox, elements with default images?  (Read 6093 times)

Minnow

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Add new toolbox, elements with default images?
« on: October 10, 2015, 11:52:24 am »
I'm trying to build my own toolbox with elements that have images from the AWS icon set (https://aws.amazon.com/architecture/icons/) so that when I do, say, an AWS deployment diagram, I can just drag an element onto the diagram without then having to manually set the alternate image every single time.  I don't see anything quite like this in the help or menus.  

Is this possible?  

Thanks


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Add new toolbox, elements with default images?
« Reply #1 on: October 10, 2015, 06:49:16 pm »
AFAIK no.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Add new toolbox, elements with default images?
« Reply #2 on: October 10, 2015, 10:34:52 pm »
Can't you make a UML profile and set the alternate image on the stereotype?
I think you can either define a shapescript, or set an alternate image.

You can combine that with a toolbox and diagram definition and package it all in an MDG technology file.

Geert

Minnow

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Add new toolbox, elements with default images?
« Reply #3 on: October 15, 2015, 12:44:33 pm »
Quote
Can't you make a UML profile and set the alternate image on the stereotype?
I think you can either define a shapescript, or set an alternate image.

You can combine that with a toolbox and diagram definition and package it all in an MDG technology file.

Geert

Thanks. I'll try to figure that out.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Add new toolbox, elements with default images?
« Reply #4 on: October 17, 2015, 09:53:38 am »
Yes you certainly can as I've done this with Enterprise Application Integration Patterns by Gregor Hohpe and Bobby Woolf.

You need to create an MDG which four parts
- Stereotypes
- Diagram type
- Toobox
- Images which you import into the model. Use emf or wmf format if you want transparent backgrounds otherwise they don't work.

You can use alternative image on the stereotype but you then have to import the image library into each model. An alternative way is to export the images into the MDG and use a shape script. That way you don't have to mess around importing image libraries into the model you are working on. Here is the an example shape script. The trick is to prefix the image withe the MDG name. In this case its EAI
Code: [Select]
shape main
{
      layouttype="border";
      image("EAI::Messaging",0,0,100,100);
      addsubshape("name","S");

      shape name
      {
            h_align="center";
            print("#NAME#");
      }
}

For each stereo type you will need three attributes
_metatype = the name of the new type
_image = holds shape script
_icon = a 16x16 bit map used in the toolbox and project browser.

Hope that helps.
 :)
« Last Edit: October 17, 2015, 09:54:59 am by phenzell »
Happy to help
:)

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Add new toolbox, elements with default images?
« Reply #5 on: October 21, 2015, 08:59:20 am »
Thanks Sunshine, I've been stuck on that for a while :-)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Add new toolbox, elements with default images?
« Reply #6 on: October 21, 2015, 07:52:21 pm »
Glad I can help.
Happy to help
:)