Void MechanicalGraphicsWrapper.ExportViewportImage(Int32 viewportIndex, String filePath, GraphicsImageExportFormat formatImage, GraphicsImageExportSettings settings)

Exports the current graphics display to a 2D image file.

Parameters

  • viewportIndex
    Type: Int32
    An integer specifying the viewport. Valid values range from -1 to 3, depending the amount of viewports open. When two viewports are open side-by-side (horizontally), 0 refers to the left viewport and 1 refers to the right viewport. When two viewports are open and stacked (vertically), 0 refers to the top viewport and 1 refers to the bottom viewport. When four viewports are open, 0 refers to the top-left viewport, 1 refers to the top-right viewport, 2 refers to the bottom-left viewport and 3 refers to the bottom-right viewport. When -1 is passed in, the image is taken from the active viewport (equivalent to using Graphics.ExportImage). -1 is the only supported value in no-GUI mode.
  • filePath
    Type: String
    The output image's file path. Non-existent directories will be created and pre-existing files will be overwritten.
  • formatImage
    The 2D image format to use when exporting.
  • settings
    The 2D image settings to use when exporting.