Author Topic: Move label outside the shape?  (Read 639 times)

anderspe

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Move label outside the shape?
« on: November 20, 2017, 07:14:09 pm »
I try to update a 3rd party vendor's MDG by editing the concerned XML-file. I want to write the name of a specific element outside the shape and I use the following:

shape main
{
   noshadow = true;
   DrawNativeShape();
}

shape label
{
    // draw a floating text label
    setOrigin("S",-20,-15);
   print("#Name#");
}

I run a base 64 encoder and replace the existing shape script in the XML-file with the outcome of the encoder.

The name label is still inside the shape! Please help!

Anders Pettersson

qwerty

  • EA Guru
  • *****
  • Posts: 8952
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Move label outside the shape?
« Reply #1 on: November 20, 2017, 07:32:29 pm »
I tried it here (V!2) and the label is outside.

q.

anderspe

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Move label outside the shape?
« Reply #2 on: November 20, 2017, 07:39:26 pm »
Sorry qwerty but where do I find your test?

Regards
Anders

qwerty

  • EA Guru
  • *****
  • Posts: 8952
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Move label outside the shape?
« Reply #3 on: November 20, 2017, 09:11:09 pm »
On my machine :-) Posting pictures here is a PITA. But using the above shape script places the label slightly below at the left of the class.

q.

anderspe

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Move label outside the shape?
« Reply #4 on: November 21, 2017, 02:15:19 am »
@qwerty or someone else, I have been able to print the name of the element outside the shape but the name is also printed inside the element? I have tried the "hidelabel" method but it doesn't work, any advice?

shape main
{
   noshadow=true;
   Drawnativeshape();
}

shape label
{
       setOrigin("S", -20,-15);
   print("#Name#");
   hidelabel("middletoplabel");
   hidelabel("middlebottomlabel");
   hidelabel("lefttoplabel");
   hidelabel("leftbottomlabel");
   hidelabel("righttoplabel");
   hidelabel("rightbottomlabel");
}

/Anders

qwerty

  • EA Guru
  • *****
  • Posts: 8952
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Move label outside the shape?
« Reply #5 on: November 21, 2017, 02:51:10 am »
Ah, you were talking about connectors?

q.

anderspe

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Move label outside the shape?
« Reply #6 on: November 21, 2017, 03:02:40 am »
No I am not talking about connectors! Is the hidelabel method only valid for connectors?

/Anders

qwerty

  • EA Guru
  • *****
  • Posts: 8952
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Move label outside the shape?
« Reply #7 on: November 21, 2017, 03:22:50 am »
Yep.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5874
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Move label outside the shape?
« Reply #8 on: November 21, 2017, 10:58:52 am »
No I am not talking about connectors! Is the hidelabel method only valid for connectors?

/Anders
Concistency, konsistency, consistensy! TMUffe - after Paolo    ;)

Paolo

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