ExportModelImageToFile

Exports the model as an image file (*.avz, *.bmp, *.gif, *.jpeg, *.tiff, *.wrl). In Release 23.1, this command is fully supports -ng (non-graphical) mode. To export to Ensight use *.avz. For export to Ensight in -ng mode, the corresponding version of Ensight must be installed. On Linux, it might need manual set environment variable AWP_ROOT212 to its installation path, e.g. AWP_ROOT212=/installations/ansys_inc/v212/ for AnsysEDT v21.2 and Ensight 21.2.

ExportModelImageToFile exports a model image with background type and color that respect the AEDT color scheme by default. You can specify the background type and color with following parameters:

Parameter Name Description Parameter Value
BackgroundType Choose one out of four types of background

Default
Plain
LinearGradient
RadialGradient

BackgroundColor Plain:
Background color LinearGradient/RadialGradient: Background start color
3 integers with a range of [0,255] that represent red, green, and blue respectively
BackgroundContrastColor Plain:
Ignored LinearGradient/RadialGradient: Background end color
3 integers with a range of [0,255] that represent red, green, and blue respectively

Note: Current scripts will not be affected, the image will be exported with default background color as it always does

If no BackgroundType is specified, or BackgroundType is Default, BackgroundColor and BackgroundContrastColor will be ignored, and the image will be exported with default background color

ExportModelImageToFile supports export overlay of polar plot 3D with existing transformation (scaling, rotation and translation) in -ng (non-graphical) mode.

UI Access Modeler > Export.
Parameters
Name Type Description
<path> String Full file path including extension.
<width> Integer Width in pixels (use 0 for default).
<height> Integer Height in pixels (use 0 for default).

<Parameters>

Array

Structured array.

Array("NAME:SaveImageParams",

"ShowAxis:=" , <string containing boolean>,

"ShowGrid:=" , <string containing boolean>,

"ShowRuler:=" , <string containing boolean>,

"ShowRegion:=" , <string>,

"Selections:=" , <string>,

Note: Comma delimited string. Use to #filter object visibility to only this set of object. Set to "" if the user desires all visible.

"FieldPlotSelections:=", <string>' # Comma delimited string. #Use to set which field plot to show.

Note: The parameter FieldPlotSelections is, by default, empty string. It causes all valid field plots to be exported. If the parameter is a string that is not the name of any valid field plots then no field plot will be exported.

"FitToSelections:=" , "",

Note: "FitToSelections" specify geometry objects for the "Fit" operation.

"FitToFieldPlotSelection:=" , ""

Note: "FitToFieldPlotSelections" specifies field plots for the "Fit" operation.

"AutoFit:=" , "True",

Note: If FitToSlections or FitToFieldPlotSelections are used , then AutoFit is True, it makes sure color key does not overlap field plot. It is False by default. If neither is used, then "AutoFit" will "Fit" to full model.

"Orientation:=" , <string>

Note: Orientation can be one of top, bottom, right, left, front, back, trimetric, dimetric, isometric, or a custom orientation added by the user.

"ShowOrientationGadget:=" , <False>

Note: Set to True to hide the Orientation widget from the exported image.
Return Value None.

Python Syntax

ExportModelImageToFile(<path> <width> <height> <Parameters>)

Python Example

oEditor.ExportModelImageToFile

("D:/Image.png", 1920, 1080,

[

"NAME:SaveImageParams",

"ShowAxis:=" , "True",

"ShowGrid:=" , "True",

"ShowRuler:=" , "True",

"ShowRegion:=" , "Default",

"Selections:=" , "",

"FieldPlotSelections:=" , "",

"FitToSelections:=" , "",

"FitToFieldPlotSelections:=", "",

"AutoFit:=" , "True",

"Orientation:=" , ""

])