Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started 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:
- 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:
[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
-
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