Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mateiacd on June 10, 2021, 04:06:22 am
-
Hi,
When I change the zoom level using Ctrl+mouse wheel or other available zoom + and - buttons, the .Scale value of the diagram does not change.
Is there any way I could find the temporary zoom level on the current diagram ?
EA.Repository rep = ...; initialized before
EA.Diagram dia = rep.GetCurrentDiagram();
// it's the same value while the diagram is open and the zoom level is changed as described above
string zoomLevel = dia.Scale.ToString();
https://sparxsystems.com/resources/user-guides/15.2/large-print/automation/enterprise-architect-object-model.pdf
-
Again probably not. AFAIK the zooming is not exposed in EA's API. You need to either do some Windoze hacks (like reading screen pixels an doing OCR or some other nasty stuff) or you resort to asking for a new feature and prepare for a long holiday.
q.