Book a Demo

Author Topic: Toolbox with elements having a custom shape  (Read 4707 times)

st1led

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
  • in a vapor trail
    • View Profile
Toolbox with elements having a custom shape
« on: November 03, 2010, 09:23:15 pm »
Hello everybody! I'm writing an add-in for EA using the Automation Interface, and I have to define a new toolbox with some custom elements.

Reading the AI user guide, I managed to define a profile for a simple toolbox. I know that each element which I have to drag&drop from the toolbox has to be defined in the toolbox profile as a stereotype extending an UML metaclass: say that I have to define a MyClass element, i create the MyClass stereotype and make it extend the Class UML metaclass. Dropping a MyClass element from the toolbox to a diagram will result in having an object which "is drawn like" a class (thus, has the shape each class has, which is a rectangle) drawn into the diagram.

What now if I have to define toolbox elements which have some shapes which aren't defined in UML (and thus, which don't have a corresponding metaclass)?
This is my problem: I have to define some toolbox elements with shapes like the parallelograms A and B, and the arrow with the perpendicular line in this picture below:



I suppose I have to somehow to define new metaclasses with custom images (parallelograms and lines), but don't know hot to proceed.

Any ideas?

Regards, Stefano
[size=9]tuesday you see
she had to be free
but somehow I got to
carry on...
[/size]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Toolbox with elements having a custom shape
« Reply #1 on: November 04, 2010, 08:46:19 am »
Search the help for shape scripts.

st1led

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
  • in a vapor trail
    • View Profile
Re: Toolbox with elements having a custom shape
« Reply #2 on: November 04, 2010, 10:28:58 am »
Thank you! I found this reference, which looks like to be relevant to what I have to do: http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/shape_editor_2.htm

I'll let you know if I'll get further problems.

Regards, Stefano

[size=9]tuesday you see
she had to be free
but somehow I got to
carry on...
[/size]

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Toolbox with elements having a custom shape
« Reply #3 on: November 08, 2010, 11:30:55 am »
What release of Enterprise Architect are you using?

This is the latest Help for Release 8.0, build 864. There are one or two small improvements.

http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/modeling_languages/shape_editor_2.html
Best Regards, Roy