Book a Demo

Author Topic: How to hide the multiplicity via shape script?  (Read 3060 times)

BGA

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
How to hide the multiplicity via shape script?
« on: March 04, 2007, 01:38:58 am »
I have created an assciation for an ER-Model which looks like the James Martin Notation. I want to hide the multiplicity label, but I don't know the labelname. Can anyone help me?

Code: [Select]

shape main
{
 noshadow = "true";

 lineto(100,0);
 
 hidelabel("middlebottomlabel"); // yes!
 hidelabel("sourcebottomlabel"); // not the right label  
 hidelabel("targetbottomlabel"); // not the right label
}

shape source
{
 noshadow = "true";
 
 if(HasProperty("source.multiplicity","1"))
 {  
   moveto(10,6);
   lineto(10,-6);
 }
 if(HasProperty("source.multiplicity","0..1"))
 {  
   polygon(10,0,16,6,180);
 }
 if(HasProperty("source.multiplicity","1..N"))
 {
   moveto(10,6);
   lineto(10,-6);    
   moveto(9,0);
   lineto(0,9);
   moveto(9,0);
   lineto(0,-9);  
 }
 if(HasProperty("source.multiplicity","0..N"))
 {
   polygon(15,0,16,6,180);
   moveto(9,0);
   lineto(0,9);
   moveto(9,0);
   lineto(0,-9);
 }
}

shape target
{
 noshadow = "true";
 
 if(HasProperty("target.multiplicity","1"))
 {  
   moveto(10,6);
   lineto(10,-6);
 }
 if(HasProperty("target.multiplicity","0..1"))
 {  
   polygon(10,0,16,6,180);
 }
 if(HasProperty("target.multiplicity","1..N"))
 {
   moveto(10,6);
   lineto(10,-6);  
   moveto(9,0);
   lineto(0,9);
   moveto(9,0);
   lineto(0,-9);  
 }
 if(HasProperty("target.multiplicity","0..N"))
 {
   polygon(15,0,16,6,180);
   moveto(9,0);
   lineto(0,9);
   moveto(9,0);
   lineto(0,-9);
 }
}

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to hide the multiplicity via shape script?
« Reply #1 on: March 04, 2007, 01:19:57 pm »
Try

HideLabel("leftbottomLabel");

and

HideLabel("rightbottomLabel");