Book a Demo

Author Topic: Invalid diagram object coordinates  (Read 4020 times)

albinofrenchy

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Invalid diagram object coordinates
« on: April 30, 2008, 07:01:29 am »
We have a tool that generates a hundred or so diagrams out of one tool; and it would be helpful to have those diagrams laid out automatically for this. The problem is that EA, for some reason, has a ton of overhead on the LayoutDiagram call; as it opens the diagram, lays it out, and then closes it again. So we have to leave it how it is, which means everything is on top of eachother.

To address this, I'm trying to use 'EA_OnContextItemDoubleClicked' to catch events in which diagrams are being opened, and simply seeing if every object starts at the same x y coordinates. If it does, perform a layout. Simple. The problem is that the coordinates given to me from the diagram are invalidat this point. As in, they are like 3000000+. It appears as if that part of the data structure hasn't been filled yet so it has junk data. I've tried updates, and things like project.loaddiagrams,  but it simply will not populate these fields correctly. Is there any way to force it to do this?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Invalid diagram object coordinates
« Reply #1 on: April 30, 2008, 08:50:39 am »
This is apparently by design.

I simply don't remember the particulars, but I do remember that the 'huge number starting with a 3' is a placeholder of some sort. It is used to flag something [that's the part I don't remember].

I was something like an element that is supposed to be positioned at the default point, or is not visible on the diagram, or whatever. I think one trick is to move the diagram object a bit, in which case EA might fill in the structure.

There was (at least) once an explanation posted in the forum, but I cannot think of the keyword you should use. See if you can get the exact number and search for that. [I thought it was only 30000, but once again, it was not something I was particularly looking for so the details didn't stay with me.]

David
No, you can't have it!

albinofrenchy

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Invalid diagram object coordinates
« Reply #2 on: May 01, 2008, 03:28:16 am »
Thanks. I couldn't find the forum post, but knowing that gave me a way to at least distinguish when I needed to do something with the diagram and when i didn't, so problem solved. This is surely an eccentric way to handle something like this though; I'd love to know the reasoning behind it.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Invalid diagram object coordinates
« Reply #3 on: May 01, 2008, 07:11:13 am »
Quote
... I'd love to know the reasoning behind it.
Assumes facts not in evidence.   :-X

I decided to look, and couldn't find it either. We might be at the mercy of the new search engine. While it seems to be better at finding some stuff, it also seems even more 'literal' with keywords.

David
No, you can't have it!