Author Topic: Create Custom Picture for a Class Element  (Read 6629 times)

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Create Custom Picture for a Class Element
« on: June 07, 2016, 12:40:27 am »
Hi is it Possible to create a ShapeScript which Looks just like a Class with a puzzlepiece in the right upper Corner.
Im only able to make the full Picture (class) representing the puzzle Piece i have designed .

Thank you for your help.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Create Custom Picture for a Class Element
« Reply #1 on: June 07, 2016, 01:15:08 am »
Sure. Just add it as Decoration with orientation="NE"

q.

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Create Custom Picture for a Class Element
« Reply #2 on: June 07, 2016, 03:26:22 pm »
Yes it works with decoration, but the Standard class Picture is gone.
now i see the puzzle in the northeast but what is with the Standard class Picture ?
shape main
{

}
decoration PuzzlePiece
{
   orientation="NE";
   image("PuzzlePiece.emf",50,0,100,50);
}

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Create Custom Picture for a Class Element
« Reply #3 on: June 07, 2016, 03:44:04 pm »
Yes it works with decoration, but the Standard class Picture is gone.
now i see the puzzle in the northeast but what is with the Standard class Picture ?
shape main
{

}
decoration PuzzlePiece
{
   orientation="NE";
   image("PuzzlePiece.emf",50,0,100,50);
}

Get rid of the shape main in your shape script. You are overriding the main shape with a blank nothing. It's OK to have a shape script consisting of just a decoration without a shape main.
The Sparx Team
[email protected]

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Create Custom Picture for a Class Element
« Reply #4 on: June 07, 2016, 04:33:50 pm »
Thank you this worked perfect (stupid mistake -.-) !

One Last Question , how can iuse my emf files for the Pictures in the Project Tree ?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create Custom Picture for a Class Element
« Reply #5 on: June 07, 2016, 04:46:49 pm »
you have to make 16x16 bitmap images for the tooolbar and project browser icons.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Create Custom Picture for a Class Element
« Reply #6 on: June 07, 2016, 05:33:32 pm »
... and specify the bitmap file as the initial value of the icon attribute (note: not _icon) in the stereotype element in your profile model.

This file is embedded in the MDG Technology XML file, so you only need it to be present at compile time.

/Uffe
My theories are always correct, just apply them to the right reality.

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Create Custom Picture for a Class Element
« Reply #7 on: June 07, 2016, 11:37:31 pm »
Thanky you !
everything worked perfect !
 ;D ;D ;D