Book a Demo

Author Topic: Label subshapes - how to?  (Read 2973 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Label subshapes - how to?
« on: February 02, 2010, 02:34:32 pm »
In A few more about profiles and MDG's
Neil replies:
Quote
Quote
- Is there a way to create labels for stereotyped connectors? How can I access and change the text of existing labels?
Create a shape named one of LeftTopLabel, MiddleTopLabel, RightTopLabel, LeftBottomLabel, MiddleBottomLabel, RightBottomLabel.

Quote
- Is it possible to suppress/change the <<stereotype>> label on connectors?
Either add the command hidelabel("MiddleBottomLabel"); to your shape main, or create a shape MiddleBottomLabel { print(""); }
However, it's not specified where in the shape script these subshapes need to be placed.

Since subshape activation is very sensitive to placement of the subshape routes, can anyone provide a worked example of how to do this?

The assembly connector is very problematic and this technology might help get around some of the inconsistencies...

Reported as Support Request,
Paolo
« Last Edit: February 02, 2010, 02:37:01 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Label subshapes - how to?
« Reply #1 on: February 07, 2010, 08:29:11 pm »
[size=20]BUMP![/size]

Anybody (including Sparxians) successfully used these shapes in a ShapeScript?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Label subshapes - how to?
« Reply #2 on: February 08, 2010, 09:14:16 am »
The label shapes go at the same scope as the shape main, e.g:

Code: [Select]
shape main
{
      noshadow=true;
      setpencolor(0,0,255);
      moveto(0,0);
      lineto(100,0);
}

shape MiddleBottomLabel
{
      print("");
}
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Label subshapes - how to?
« Reply #3 on: February 08, 2010, 09:42:03 am »
Thanks Neil...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!