ExportImageToFile [Reporter]

Exports a report image in a specified format.This command is fully supports -ng (non-graphical) mode.

UI Access N/A
Parameters
Name Type Description
<ReportName> String Name of report to be exported.
<FileName> String Full path of the exported image file name; with extension of jpg, gif, tiff, tif, bmp, or wrl.
<Width> Integer Image width in pixels; if width or height is less or equal to zero, use the report window width, or 500 pixels if report window is closed.
<Height> Integer Image height in pixels; if width or height is less or equal to zero, use the report window height, or 500 pixels report window is closed.
[<SaveImageParameters2D>] Boolean Whether to ShowLegend, ShowMarkerTable, ShowDeltaMarkerTable. Values can be True, False or Default. Default is True.
[<SaveImageParameters3D>]   Whether to AutoFit [Default is "False"]
ShowLegend, ShowMarkerTable, ShowDeltaMarkerTable. Values can be True, False or Default. Default is True.
Return Value None.

 

Python Syntax ExportImageToFile(<ReportName>, <FileName>, <Width>, <Height>)
Python Example

#### Script Recorded for Saving 2D

oDesktop.OpenProject("E:/Ansoft/Tee2.aedt")

oProject = oDesktop.SetActiveProject("Tee2")

oDesign = oProject.SetActiveDesign("TeeModel")

oModule = oDesign.GetModule("ReportSetup")

oModule.ExportImageToFile("S Parameter Plot 1", "E:/Ansoft/S Parameter Plot 1.png", 1920, 1080)

oModule.ExportImageToFile("S Parameter Plot 12", "E:/Ansoft/S Parameter Plot 12.png", 1920, 1080)

oModule.ExportImageToFile("S Parameter Plot 1", "E:/Ansoft/S Parameter Plot 1.png", 1920, 1080,

[

"NAME:SaveImageParams",

"ShowLegend:=" , "False",

"ShowMarkerTable:=" , "False"

"ShowDeltaMarkerTable:=" , "False"

])

oModule.ExportImageToFile("S Parameter Plot 1", "E:/Ansoft/S Parameter Plot 1.png", 1920, 1080,

[

"NAME:SaveImageParams",

"ShowLegend:=" , "True",

"ShowMarkerTable:=" , "True" "ShowDeltaMarkerTable:=" , "False"

])

oModule.ExportImageToFile("S Parameter Plot 12", "E:/Ansoft/S Parameter Plot 12.png", 1920, 1080,

[

"NAME:SaveImageParams",

"ShowLegend:=" , "False",

"ShowMarkerTable:=" , "Default" "ShowDeltaMarkerTable:=" , "False"

])

oModule.ExportImageToFile("S Parameter Plot 12", "E:/Ansoft/S Parameter Plot 12.png", 1920, 1080,

[

"NAME:SaveImageParams",

"ShowLegend:=" , "True",

"ShowMarkerTable:=" , "Default"

"ShowDeltaMarkerTable:=" , "True"

])

oDesktop.CloseProject("Tee2")

 

### Script Recorded for saving as 3D:

 

oDesktop.OpenProject("E:/Ansoft/Tee2.aedt")

oProject = oDesktop.SetActiveProject("Tee2")

oDesign = oProject.SetActiveDesign("TeeModel")

oModule = oDesign.GetModule("ReportSetup")

oModule.ExportImageToFile("S Parameter Plot 6", "E:/Ansoft/S Parameter Plot 11.png", 1335, 466,

[

"NAME:SaveImageParams",

"AutoFit:=" , "False",

"Orientation:=" , "",

"ShowOrientationGadget:=", "Default"

])

oModule.ExportImageToFile("S Parameter Plot 6", "E:/Ansoft/S Parameter Plot 11.png", 1335, 466,

[

"NAME:SaveImageParams",

"AutoFit:=" , "False",

"Orientation:=" , "",

"ShowOrientationGadget:=", "Default"

"ShowLegend:=" , "True"

])

oModule.ExportImageToFile("S Parameter Plot 6", "E:/Ansoft/S Parameter Plot 10.png", 1335, 466,

[

"NAME:SaveImageParams",

"AutoFit:=" , "False",

"Orientation:=" , "",

"ShowOrientationGadget:=", "Default",

"ShowLegend:=" , "False"

])