Author Topic: ShapeScript: ProvidetInterface - Type (Provided or Exposed)  (Read 437 times)

m2i7c9k

  • EA User
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
ShapeScript: ProvidetInterface - Type (Provided or Exposed)
« on: September 05, 2022, 05:01:42 am »
Hi Guys,

I please for help: I have shape scrip Provided interface, and I don't know how to hide
stereotype label, if I changed exposed interface to Required :(

What I'm missing? I looked at "query" books and EA help, but I can't find the answer.

Thaks a lot
Mick

---------------------------------------------------------------------------------------------------------
shape main
{
   fixedAspectRatio = "true";
   
   if(hasproperty("parentedge","top"))
   {   
      DefSize(13,40);
      DrawNativeShape();
   }
   
   if(hasproperty("parentedge","left"))
    {
      DefSize(40,13);
      DrawNativeShape();
   }
   
   if(hasproperty("parentedge","right"))
    {
      DefSize(40,13);
      DrawNativeShape();
   }
   
   if(hasproperty("parentedge","bottom"))
   {
      DefSize(40,13);
      DrawNativeShape();
   }
   
}

shape label
{   
   if(hasproperty("parentedge","top"))
   {
      SetOrigin("N",0,0);
      Print("#name#");
   }
   
   if(hasproperty("parentedge","left"))
   {
      SetOrigin("S",0,0);
      Print("#name#");
   }
   
   if(hasproperty("parentedge","right"))
   {
      SetOrigin("S",0,0);
      Print("#name#");
   }
   
   if(hasproperty("parentedge","bottom"))
   {
      SetOrigin("S",0,0);
      Print("#name#");
   }
   
   if(hasproperty("type", "required"))
   {
      Print("#name#");   
   }
   
   /*
   if(HasProperty("Type","Required"))
   {
      Print("#name#");   
   }
   */
}

qwerty

  • EA Guru
  • *****
  • Posts: 13070
  • Karma: +376/-298
  • I'm no guru at all
    • View Profile
Re: ShapeScript: ProvidetInterface - Type (Provided or Exposed)
« Reply #1 on: September 05, 2022, 07:21:03 pm »
I'm still busy but will have a look these days...

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12258
  • Karma: +484/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: ShapeScript: ProvidetInterface - Type (Provided or Exposed)
« Reply #2 on: September 05, 2022, 09:14:18 pm »
Hi Mick,

You are using
Code: [Select]
DrawNativeShape();and I think that is the part that will print the stereotype.

I'm guessing the only option you have is to write the full shapescript yourself, so you can control whether or not the stereotype should be visible.

Geert

m2i7c9k

  • EA User
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: ShapeScript: ProvidetInterface - Type (Provided or Exposed)
« Reply #3 on: September 06, 2022, 05:58:51 pm »
Thank You Guys,

I'll try my shape script without native; I'll see how it ends.
Mick