Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: agdunn on December 05, 2008, 01:27:41 am

Title: Shape Script - Linkable Object
Post by: agdunn on December 05, 2008, 01:27:41 am
I have played around with creating my own custom shapes, however I am wondering if it might be possible for me to create a shape that would use the link property to make itself 'clickable' instead of click on the shape and getting the EA generated information (In the HTML report) You could click on the shape and it will pop open a new browser window to whatever URL was in the link parameter.

Dont know if anyone has done this at all, figured I would write a quick post and find out before I went and investigated further.
Title: Re: Shape Script - Linkable Object
Post by: KP on December 08, 2008, 02:15:39 pm
On the UML Elements toolbar (View > Toolbars > UML Elements) there is a hyperlink element that you can drop onto a diagram. Right-click > Properties and enter a URL in the "Hyperlink Address" field. You can shape script them by entering a stereotype in the Properties docked window (Alt+1).
Title: Re: Shape Script - Linkable Object
Post by: agdunn on December 09, 2008, 12:53:40 am
Thanks very much for the reply, Didnt know you could stereotype hyperlink objects. This works really well, however the biggest problem now will be maintainability. On diagrams where we have 100+ elements it is actually quite helpful to have them show up in the project browser view so the user can right click+locate.

There is no way to stereotype an activity to act like a hyperlink? I think if we could do this it would solve our problems immensely.

Shape script I used for the hyperlinks:

Code: [Select]
shape main {
      rectangle(0,0,100,100);
      
      addsubshape("text", 100, 100);
      
      shape text {
            layoutType = "leftright";
            h_align = "center";
            v_align = "center";
            println("#Name#");
      }
}