Book a Demo

Author Topic: update() call on diagram objects ea10 bug?  (Read 3351 times)

rayt

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
update() call on diagram objects ea10 bug?
« on: November 21, 2013, 02:22:33 am »
Hello,
making a simple call to update() on the diagram object of a structural element moves the box to (0,0) inside its parent - this was working in EA 9, but appears broken in EA 10.
can anyone reproduce this or maybe have a workaround?
thanks,
ray

Here is some code to reproduce the effect. Apparently it works with normal elements, but not with structural elements.
Code: [Select]
OnProjectBrowserScript();

function OnProjectBrowserScript()
{
      var theDiagram as EA.Diagram;
      theDiagram = Repository.GetTreeSelectedObject();
      
      for(var i = 0, maxi = theDiagram.DiagramObjects.Count; i < maxi; i++) {
            var dob as EA.DiagramObject;
            
            dob = theDiagram.DiagramObjects.GetAt(i);            
            dob.Update();
      }
      
      theDiagram.Update();
}


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: update() call on diagram objects ea10 bug?
« Reply #1 on: November 21, 2013, 02:25:46 am »
Might be connected to a broken placement of embedded elements in V10 which worked in 9.3. I have reported this a while ago after one reader of my Scripting book noticed that the example did not work in V10.

You should report this as a bug. That might shorten the time to fix...

q.

P.S. The final Diagram.Update is superfluous.
« Last Edit: November 21, 2013, 02:27:50 am by qwerty »

rayt

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: update() call on diagram objects ea10 bug?
« Reply #2 on: November 21, 2013, 02:52:13 am »
Thanks for your reply, I'll report a bug.
Btw this only happens when the diagram is not visible in a window, so caling Repository.OpenDiagram(theDiagram.DiagramID); before the update is an (ugly) workarond.
« Last Edit: November 21, 2013, 02:52:45 am by rayt »

rayt

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: update() call on diagram objects ea10 bug?
« Reply #3 on: November 21, 2013, 08:57:34 pm »
indeed know issue, fix scheduled for ea11
ray