Author Topic: width and hight of a diagram  (Read 3430 times)

SchneiderSwisscom

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
width and hight of a diagram
« on: January 25, 2008, 05:24:01 am »
does someone know, how to calculate the width and hight of a diagram using the information in t_diagram and t_diagramobjects?

gpc

  • EA User
  • **
  • Posts: 111
  • Karma: +0/-0
    • View Profile
Re: width and hight of a diagram
« Reply #1 on: January 30, 2008, 06:10:57 am »
Probably not what you're looking for, but what about getting EA to generate the diagram and paste to the clipboard and then looking at the properties of the image?

e.g.

funcs.PutDiagramImageOnClipboard(diagGUID, diagType);

Image image = Clipboard.GetImage();
int h = image.Height;
int w = image.Width;


SchneiderSwisscom

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: width and hight of a diagram
« Reply #2 on: January 30, 2008, 07:20:19 am »
thanks for your reeply

It is not exactly what I am looking for. We try to use the diagrams for navigating throug an application.
In the t_diagramobject table there is informationen about the position of each object on the diagram. The position is relative to the representation in EA. The hight and width of the diagram depend on several parameter like border and empty space at the top.

gpc

  • EA User
  • **
  • Posts: 111
  • Karma: +0/-0
    • View Profile
Re: width and hight of a diagram
« Reply #3 on: January 30, 2008, 07:37:20 am »
I haven't looked at that data, but there may be a problem with just using the data in the diagramobject table. there is a bug in 7.0 (818), not sure if it is in 7.1 beta1, where the diagram width is handled incorrectly when messages use constraints - it seems that the text position is not taken into account and can be clipped.
I mention this because if you are able to calculate the width and height from the table entries, then you may also fall foul of this bug by not considering such components.

SchneiderSwisscom

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: width and hight of a diagram
« Reply #4 on: January 30, 2008, 08:14:47 am »
Yes that is exactly what I found out till now. But EA generates diagrams. So there must be rules, which allows EA to calculate the width and hight of a diagram. Probably I have to use ohter tables to

gpc

  • EA User
  • **
  • Posts: 111
  • Karma: +0/-0
    • View Profile
Re: width and hight of a diagram
« Reply #5 on: January 31, 2008, 02:14:58 am »
I've just had a quick look as someone has asked me to generate a report with diagrams containing clickable links !?! The diagram objects positions are given relative to the page (I assume), but this doesn't help when the diagram is copied/pasted. I would guess that the bounding-box dimensions chosen for the copy is determined on-the-fly and not stored :(
Sorry, can't help. Let us know if you figure it out ;)