Skip to main content

Mechanical scripting interface

GraphicsViewportsExportSettings

Last update: 14.01.2025

class Ansys.Mechanical.Graphics.GraphicsViewportsExportSettings

Bases: object

Settings object to control Graphics.ExportViewports behavior.

Overview

Properties

Name Description
AppendGraph Specifies whether to append the viewport graph(s) to the exported image. Defaults to false.
Background Specifies the background color. Defaults to GraphicsAppearanceSetting.
BorderStyle Specifies which borders to add, if any, to the exported viewports image.
Capture Specifies what to include in the capture. Defaults to ImageAndLegend.
CurrentGraphicsDisplay Specifies whether to use the current graphics display settings. Defaults to true.
FontMagnification Specifies the font magnification factor. Defaults to 1.0.
Height Specifies the image height. Defaults to 0. If width AND height are zero, this uses the current dimensions. If only one of the two are nonzero, the current dimension’s ratio is used along with the nonzero of the two properties to determine the computed value of the zero property.
Resolution Specifies the resolution type. Defaults to NormalResolution.
Width Specifies the image width. Defaults to 0. If width AND height are zero, this uses the current dimensions. If only one of the two are nonzero, the current dimension’s ratio is used along with the nonzero of the two properties to determine the computed value of the zero property.

Property detail

property GraphicsViewportsExportSettings.AppendGraph : bool | None

Specifies whether to append the viewport graph(s) to the exported image. Defaults to false.

property GraphicsViewportsExportSettings.Background : Ansys.Mechanical.DataModel.Enums.GraphicsBackgroundType | None

Specifies the background color. Defaults to GraphicsAppearanceSetting.

property GraphicsViewportsExportSettings.BorderStyle : Ansys.Mechanical.DataModel.Enums.GraphicsViewportsExportBorderStyle | None

Specifies which borders to add, if any, to the exported viewports image. Border style enum values can be combined via bitwise-or ( | ). Defaults to None.

property GraphicsViewportsExportSettings.Capture : Ansys.Mechanical.DataModel.Enums.GraphicsCaptureType | None

Specifies what to include in the capture. Defaults to ImageAndLegend.

property GraphicsViewportsExportSettings.CurrentGraphicsDisplay : bool | None

Specifies whether to use the current graphics display settings. Defaults to true.

property GraphicsViewportsExportSettings.FontMagnification : float | None

Specifies the font magnification factor. Defaults to 1.0.

property GraphicsViewportsExportSettings.Height : int | None

Specifies the image height. Defaults to 0. If width AND height are zero, this uses the current dimensions. If only one of the two are nonzero, the current dimension’s ratio is used along with the nonzero of the two properties to determine the computed value of the zero property.

property GraphicsViewportsExportSettings.Resolution : Ansys.Mechanical.DataModel.Enums.GraphicsResolutionType | None

Specifies the resolution type. Defaults to NormalResolution.

property GraphicsViewportsExportSettings.Width : int | None

Specifies the image width. Defaults to 0. If width AND height are zero, this uses the current dimensions. If only one of the two are nonzero, the current dimension’s ratio is used along with the nonzero of the two properties to determine the computed value of the zero property.