Author Topic: How to find the temporary zoom level on the current diagram ?  (Read 3280 times)

mateiacd

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
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
« Last Edit: June 11, 2021, 10:53:11 pm by mateiacd »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How to find the temporary zoom level on the current diagram ?
« Reply #1 on: June 12, 2021, 08:28:09 am »
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.