Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: 2pointO on July 22, 2016, 07:32:16 pm

Title: Mutlipe Labels for an element (besides connectors)
Post by: 2pointO on July 22, 2016, 07:32:16 pm
Hello,

Is there a possibility to add more than one label to an element which is not a connector (e.g. component , exposed interfaces ...?

Greetings Sarah
Title: Re: Mutlipe Labels for an element (besides connectors)
Post by: qwerty on July 22, 2016, 07:57:24 pm
Label?

You can add as many notes as you like.

q.
Title: Re: Mutlipe Labels for an element (besides connectors)
Post by: 2pointO on July 22, 2016, 08:01:53 pm
Hello,

I don't want to add notes because want to be able to hide or show specific labels seperatly or display specific component informations throw those labels therefore, I want multiple labels for one element like this one :

Code: [Select]
shape label
{

 setOrigin("SW",0,0);

 println("Object: #NAME#");

}
Title: Re: Mutlipe Labels for an element (besides connectors)
Post by: qwerty on July 22, 2016, 08:59:02 pm
Shapescript accepts only one label shape.

q.
Title: Re: Mutlipe Labels for an element (besides connectors)
Post by: Geert Bellekens on July 23, 2016, 05:21:55 pm
But you can add ad many texts as you want in your shapescript.

Geert
Title: Re: Mutlipe Labels for an element (besides connectors)
Post by: qwerty on July 23, 2016, 05:44:14 pm
But to get text outside you need to be tricky:

Code: [Select]
shape label {
 setOrigin("NE",0,0);
 println("Object: #NAME#");
}

shape main {
  DrawNativeShape();
  AddSubShape("top",100,100);
  AddSubShape("below",100,10);

  shape top {}
  shape below {
   println("out: #NAME#");
  }
}

q.