Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Jerry Gray on April 11, 2012, 12:56:57 am

Title: Shape script - sequence diagram - namespace issue
Post by: Jerry Gray on April 11, 2012, 12:56:57 am
Hi folks, I modified the actor stereotype because we wanted to use a rectangular shape instead of the stick figure.

The challenge is that in my sequence diagrams my "stick figure" stereotypes have the namespace, e.g. "from Approved Actors" (this is the name of the package the actor is kept in), at the bottom of the lifeline, (as it should be).  However, the stereotype that I have modified to, has the namespace at the top of the lifeline, which is annoying.  :(

The question is, how do I get the namespace to be back at the bottom of the lifeline?

shape code below.

shape main
{
      noshadow = "true";
      h_align = "center";
      
      editableField = "name";
      
      setfillcolor(255, 255, 255); // (R, G, B)
      rectangle(0,0,100,100);
      //uses the name set by the user when creating
      //the instance
      println("#name#");
      
}
Title: Re: Shape script - sequence diagram - namespace is
Post by: Makulik on April 11, 2012, 05:52:38 pm
Hi,

You don't even need to provide your own shape script to achieve this. Right click on the actor, choose Advanced->Use Rectangular Notation.

HTH,
Günther
Title: Re: Shape script - sequence diagram - namespace is
Post by: Jerry Gray on April 12, 2012, 04:02:47 am
Wow.  That was way too easy.

Thanks.
Title: Re: Shape script - sequence diagram - namespace is
Post by: Jerry Gray on April 12, 2012, 04:16:39 am
Ah, now back to the original problem, when the actor is switched to rectangular notation the namespace moves to the top of the lifeline instead of staying at the bottom.
Title: Re: Shape script - sequence diagram - namespace is
Post by: qwerty on April 12, 2012, 07:32:57 pm
That's the way EA is doing it. You would need to submit a feature request.

q.
Title: Re: Shape script - sequence diagram - namespace is
Post by: Jerry Gray on April 12, 2012, 11:54:05 pm
Dear feature request, please be consistent in namespace placing.   ::)

I have found a benefit of using the shape script over right-clicking on a actor and selecting rectangular notation:  

Changing to rectangular notation can apparently only be done after the actor is placed in a sequence diagram, while using the shapescript can apply a stereotype to a set of actors in a package, saving the user from having to make the change in the diagram.