Book a Demo

Author Topic: EA 13 - Get diagram current user scale  (Read 3719 times)

christian.gallant

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
EA 13 - Get diagram current user scale
« on: November 21, 2016, 07:26:05 pm »
With EA 13 there is a new feature at diagrams, which sets a default scalefactor. This will be set at load and reload a diagram.
We have an external toolbox with functions to edit and layout diagrams. Sometimes we have to reload a diagram to show the changes to the user. The new feature is more kind of a bug, when a user changes the visible scale and we reload the diagram.

Is there any chance to get the current scale set by the user through the ui?
I saw thath t_diagram.Scale holds the default scalefactor set at the diagram properties. Is there any chance to catch the current scalefactor set by the user?
« Last Edit: November 21, 2016, 07:28:43 pm by christian.gallant »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: EA 13 - Get diagram current user scale
« Reply #1 on: November 22, 2016, 09:08:30 am »
Let me see if I've understood you correctly...

You have an add-in which is making an unspecified change to a diagram. I don't know if that change is automatic or selected by a user. Either way it is made in such a way that to display it to the user you need to reload the diagram. But when you do, users notice that the zoom level changes if they have altered it.

Your request is to read the adjusted zoom level. While that's not impossible, it also doesn't seem like it will help without the ability to set the zoom too.

Even so, it feels like it isn't the right solution. Of the solutions that come to my mind immediately, the best experience for the end user in order would be.
  • Allowing your changes to be made without requiring a reload at all. Obviously that requires you to share more information about what you're doing though.
  • Not resetting the zoom on reload. This would be consistent with not changing the scroll position.
  • Allowing an add-in to reset the zoom after it calls reload. Probably the easiest, but means all undo is lost and this kind of thing has caused unsaved changes to be lost in the past