How do I export the Mechanical Graphics window image in a desired image format?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 454
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
edited June 2023 in Structures

How do I export the Mechanical Graphics window image in a desired image format?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 454
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    Answer ✓

    Using ExtAPI.Graphics.ExportImage(filepath, image_format, image_settings)

    Example:

    image_settings = Ansys.Mechanical.Graphics.GraphicsImageExportSettings()
    image_settings.Background = GraphicsBackgroundType.White
    image_settings.Resolution = GraphicsResolutionType.HighResolution
    image_settings.FontMagnification = 1.3
    image_settings.Width = 600
    image_settings.Height = 500
    image_settings.CurrentGraphicsDisplay = False
    
    ExtAPI.Graphics.ExportImage(r"\Path\to\my\test_image.bmp", GraphicsImageExportFormat.BMP, image_settings)