Book a Demo

Author Topic: Change the diagram scale before export it to a file (SaveDiagramImageToFile)  (Read 2915 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Hi,

I'm using the Project.SaveDiagramImageToFile method to save a diagram to a PNG file.
I need to set the highest definition by changing the scale from 100% to 400%. In EA, I can do this via the Publish > [Diagram Image] Save > Scale Image menu.
With the API, I open the diagram and use the Scale property e.g. diagram.Scale = 400. However this doesn't do anything. I noticed that the applied Scale value depends on the last selection in EA from the above menu e.g. if I set Scale = 400%, the export script works fine.

Is it a bug ?
« Last Edit: July 04, 2023, 10:40:48 pm by Guillaume »
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
I would call it so. Sparx wouldn't. You can send a feature request (more than that they will not allow; and it is an open end thingy). Or you figure out where the scale is stored. Try t_diagram.scale (maybe it's in the API).

q.