Book a Demo

Author Topic: Change connector position  (Read 3178 times)

quirko

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Change connector position
« on: March 23, 2010, 01:02:04 am »
Hi,

i've got a simple sequence diagram. What i want to achive is to change every connector position in this diagram. Below is code that I wanted to use for this purpose.
Code: [Select]
           for (Connector conn : element.GetConnectors()) {
                    System.out.println(String.format("Element [%s] has connection: %s, end: %s, X,Y: [%d, %d], color [%d]", element.GetName(), conn.GetName(), conn.GetSupplierID(), conn.GetStartPointX(), conn.GetStartPointY(), conn.GetColor()));
                    conn.SetStartPointY(conn.GetStartPointY() - 100);
                    conn.SetEndPointY(conn.GetEndPointY() - 100);
                    conn.SetName(conn.GetName() + "_new");
                    conn.SetColor(32896);
                    conn.Update();
            }

Result is only partial correct, color and name are changed, but position is not. What i'm doing wrong? Or maybe there is no option to change this property?

Thanks in advance,
Paul