Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: George on May 10, 2025, 05:58:42 pm

Title: When does EA update diagram object size/position?
Post by: George 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:
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
Title: Re: When does EA update diagram object size/position?
Post by: Geert Bellekens 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