Mv2 (Model Viewer 2)

class iesve.Mv2

Bases: object

Interface for Model Viewer 2.


take_snapshot(file_name: str = 'Snapshot', path: str = '', view_mode: mv2_viewmode = mv2_viewmode.shaded, components: bool = False) None

Takes a snapshot of the model, using model viewer 2, and saves it to disk as a png image.

If path or file_name are specified, the caller is responsible for making sure they are valid.

Parameters:
  • file_name (str, Optional) – output filename. Extension .png will be added automatically.

  • path (str, Optional) – location where to save file. Empty string (‘’) means current project folder.

  • view_mode (mv2_viewmode, Optional) – rendering mode.

  • components (bool, Optional) – True to include components, else False. Component viewmode will force components on.


take_snapshot_or_create_blank_image(file_name: str = 'Snapshot', path: str = '', view_mode: mv2_viewmode = mv2_viewmode.shaded, components: bool = False) None

Checks user preference for report images. If Active Model is selected, this function takes a snapshot of the model, using model viewer 2, and saves it to disk as a png image. If None is selected, this function creates a blank placeholder image to be used in reports.

If path or file_name are specified, the caller is responsible for making sure they are valid.

Parameters:
  • file_name (str, Optional) – output filename. Extension .png will be added automatically.

  • path (str, Optional) – location where to save file. Empty string (‘’) means current project folder.

  • view_mode (mv2_viewmode, Optional) – rendering mode.

  • components (bool, Optional) – True to include components, else False. Component viewmode will force components on.



Enums

class iesve.mv2_viewmode(*values)

Bases: IntEnum


component = 5


hidden_line = 2


shaded = 0


textured = 1


xray = 4