export_model_picture#
- PostProcessor3DLayout.export_model_picture(full_name: str | Path = None, show_axis: bool = True, show_grid: bool = True, show_ruler: bool = True, show_region: str = 'Default', selections: list[str] = None, field_selections: str | list[str] = None, orientation: str = 'isometric', width: int = 0, height: int = 0) str#
Export a snapshot of the model to a
JPGfile.Note
This method works only when AEDT is running in the graphical mode.
- Parameters:
- full_name
str,optional Full Path for exporting the image file. The default is
None, in which case working_dir is used.- show_axisbool,
optional Whether to show the axes. The default is
True.- show_gridbool,
optional Whether to show the grid. The default is
True.- show_rulerbool,
optional Whether to show the ruler. The default is
True.- show_regionbool,
optional Whether to show the region or not. The default is
Default.- selections
list,optional Whether to export image of a selection or not. Default is None.
- field_selections
str,list,optional List of Fields plots to add to the image. Default is None. “all” for all field plots.
- orientation
str,optional Picture orientation. Orientation can be one of “top”, “bottom”, “right”, “left”, “front”, “back”, “trimetric”, “dimetric”, “isometric”, or a custom orientation that you added to the Orientation List.
- width
int,optional Export image picture width size in pixels. Default is 0 which takes the desktop size.
- height
int,optional Export image picture height size in pixels. Default is 0 which takes the desktop size.
- full_name
- Returns:
strFile path of the generated JPG file.
References
>>> oEditor.ExportModelImageToFile
Examples
>>> from ansys.aedt.core import Q3d >>> q3d = Q3d(non_graphical=False) >>> output_file = q3d.post.export_model_picture(full_name=Path(q3d.working_directory) / "images1.jpg")