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 |
| 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 |
|
|||||||||||||||
| 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:=" , "" ]) |