Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Maggie on June 05, 2014, 10:51:45 pm

Title: add compartment with shape script
Post by: Maggie on June 05, 2014, 10:51:45 pm
Hi
I am trying to add a compartment to show the status of an element by am having some difficulties
My shape script is defined as
Code: [Select]
shape main

  {
//        SetFillColor(100,100,100);
            DrawNativeShape();
  
 

      addsubshape("statuscompartment", 100, 20);

        shape statuscompartment
            {

                  h_align = "center";

                  rectangle(0,0,100,100);

                  println("status: #status#");

            }
  }
This does display a compartment, but at the top of the element
How can I get the compartment displayed at the bottom of the element ?

Thanks

Maggie
Title: Re: add compartment with shape script
Post by: qwerty on June 05, 2014, 11:43:33 pm
Try this:
Code: [Select]
shape main {
//        SetFillColor(100,100,100);
      DrawNativeShape();


      AddSubShape ("empty", 100, 80);
    addsubshape("statuscompartment", 100, 20);

      shape empty {}
      shape statuscompartment {
            h_align = "center";
            rectangle(0,0,100,100);

            println("status: #status#");
      }
}

q.
Title: Re: add compartment with shape script
Post by: Maggie on June 06, 2014, 12:28:36 am
Thanks!!