Where can I find examples for settings for ExtAPI.Graphics.ExportImage?

feebletomfeebletom Member
edited January 12 in Structures

I want to create a button that exports the current screen with a white background and at high resolution.

It looks like GraphicsImageExportSettings.Background(white) is the correct syntax but I don't know how to make this work with ExtAPI.Graphics.ExportImage. The ACT API Reference Guide wasn't much help.

Also, is it possible to change the scale, via coding, prior to exporting the image?

Thank you.

Tagged:

Answers

  • I found this in the Ansys help but can't get it to work:

    #export model to AVZ file with white background
    setting3d = Ansys.Mechanical.Graphics.Graphics3DExportSettings()
    setting3d.Background = GraphicsBackgroundType.White
    Graphics.Export3D("c:\\avz_white.avz", Graphics3DExportFormat.AVZ, setting3d)
    
    #export image with enhanced resolution to PNG file
    setting2d = Ansys.Mechanical.Graphics.GraphicsImageExportSettings()
    setting2d.Resolution = GraphicsResolutionType.EnhancedResolution
    Graphics.ExportImage("c:\\temp\\image_enhancement.png", GraphicsImageExportFormat.PNG, setting2d)
    
Sign In or Register to comment.