How do I export images with user defined size and user defined Legend Font?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 452
100 Answers 250 Likes 100 Comments First Anniversary
✭✭✭✭
edited June 2023 in Structures
image_settings = Ansys.Mechanical.Graphics.GraphicsImageExportSettings()
image_settings.Width = 1600
image_settings.Height = 1500
image_settings.CurrentGraphicsDisplay = True
ExtAPI.Graphics.ExportImage(r"\Path\to\test.bmp", GraphicsImageExportFormat.BMP, image_settings)

The above written code exports image with the legend settings user has defined but overwrites the Width and Height to Mechanical default. Setting image_settings.CurrentGraphicsDisplay = False exports images with the user defined size but the legend font is then default Mechanical.

I can't find a way to do both. Ideally image_settings.CurrentGraphicsDisplay = True should not overwrite the image dimensions defined by the user.

Tagged:

Answers