Author Topic: When does EA update diagram object size/position?  (Read 681 times)

George

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
When does EA update diagram object size/position?
« on: May 10, 2025, 05:58:42 pm »
Hi all,
I'm working with EA 16+ (64-bit) and I’m trying to understand, when and how EA updates the size and position of objects in a diagram — for example, based on the element's name length, displayed features, etc.
If I insert an object into a diagram via script and set its size to something very small (e.g. 20×20), it seems that EA keeps using those coordinates until:
  • I open the diagram (Repository.OpenDiagram) – at that point EA renders the object with correct size on screen, but the original coordinates are still stored,
  • I save the diagram (Repository.SaveDiagram) – only then are the updated dimensions written to the model.
Here’s an example of the script output:
Code: [Select]
[695255689]      Calculated object position: left=300, top=100, right=320, bottom=120
[695255717]      Position initial: left=300, top=100, right=320, bottom=120
[695255736]      Position after AdviseElementChange: left=300, top=100, right=320, bottom=120
[695255741]      Position after ReloadDiagram: left=300, top=100, right=320, bottom=120
[695256049]      Position after OpenDiagram: left=300, top=100, right=320, bottom=120
[695256117]      Position after SaveDiagram: left=300, top=100, right=371, bottom=142
So my question is:
Is there a way to force EA to recalculate object size and position in the background, without having to open the diagram?

Thanks in advance for any insight or shared experience!
Jiri

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: When does EA update diagram object size/position?
« Reply #1 on: May 10, 2025, 09:07:43 pm »
So my question is:
Is there a way to force EA to recalculate object size and position in the background, without having to open the diagram?

I don't think so

Geert