Skip to main content

Motion Standalone Postprocessor C# library 2026 R1

Interface IView

Last update: 09.03.2026

Namespace: VM.Operations.Post.Interfaces
Assembly: VM.Operations.Post.dll

Represents a view in the application, providing functionalities to manage and interact with views.

public interface IView

Examples

To view the examples, refer to the location of the 'Install_Path\Motion\Document\Postprocessor API for Python.zip' file.

# IView.py
import sys

# Get the current file's path and set the path for external modules.
current_dir = __file__.rsplit('\\', 1)[0]
external_modules_path = current_dir + '\\..\\..\\Modules'
sys.path.append(external_modules_path)

# Import necessary modules
from OperationAPI import *

# Start the headless application interface
applicationHandler = ApplicationHandler()

# Import result file
result_file_path = get_result_file_path()

# Set array about result file
filepaths = List[str]()
filepaths.Add(result_file_path)

# Open about result files
# This will open the result file in the application.
# When the result is first opened, a Page is created and an Animation View is created on that Page.
applicationHandler.AddDocument(filepaths)

# Get Active Page
# This retrieves the currently active page in the application.
page = applicationHandler.GetActivePage()

page.FullName = "Page1"

# Add a new page
# This will create a new page and activate it.
# You can specify the page name when the page is created.
page2 = applicationHandler.AddPage("Page2")
page.Activate()

# result_file_path - Get the document from the result file path.
document = applicationHandler.GetDocument(result_file_path)

# This retrieves the analysis result from the document.
# Types of Analysis Results
# - Dynamics
# - Eigenvalue
# - Statics
dynamic_analysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics)

# Create an Animation View on the active page
# This will create an animation view based on the dynamic analysis.
animation = page.CreateAnimation(dynamic_analysis, "ResultAnimation")

# Creating a Chart
# Create a new Chart View on the page
# This will create a new chart view with the specified name.
chart = page.CreateChart("Chart")
chart.FullName = "Chart1"
animation.DockTo(DockLayout.Top, chart)

page2.Activate()
chart.GroupName = "Page2"

page.Activate()

# Get Active View
# This retrieves the currently active view in the page.
activeView = page.GetActiveView()
page.CloseView(activeView)

# Get all created pages.
# This retrieves all pages created in the application.
pages = applicationHandler.GetPages()
for page in pages :
    page.Close()

# Close the Document
applicationHandler.CloseDocument(result_file_path)

Properties

FullName

Gets or sets the name of the view.

string FullName { get; set; }

Property Value

string

Examples

For an example that includes this property, see the Interface IView.

Remarks

The property provides a simple way to manage the name of a view. It is a read-write property, meaning it can be both retrieved and modified. This property is typically used in scenarios where the view's name is needed for display, logging, or processing purposes.

GroupID

Gets the ID of the page that the current view belongs to.

Guid GroupID { get; }

Property Value

Guid

Examples

For an example that includes this property, see the Interface IView.

Remarks

The property provides the ID of the page to which the current view belongs. This property is read-only and is set when the view is associated with a page. It allows for identifying the parent page of a view.

GroupName

Gets or sets the name of the page that the current view belongs to.

string GroupName { get; set; }

Property Value

string

Examples

For an example that includes this property, see the Interface IView.

Remarks

The property allows getting or setting the name of the page to which the current view belongs. When accessed, it retrieves the name of the parent page. When set, it updates the name of the parent page, allowing the name of the page to be changed from the context of the current view.

ID

Gets the unique identifier of the view.

int ID { get; }

Property Value

int

Examples

For an example that includes this property, see the Interface IView.

Remarks

The property provides the unique identifier for the view. This identifier is generated at the time of the view's creation and remains constant for the lifetime of the view. The property is read-only and ensures each view can be uniquely identified.

ViewType

Gets the type of the view, indicating whether it is an Animation or Chart type. Supported view types include:

  • Animation
  • Chart
ViewType ViewType { get; }

Property Value

ViewType

Examples

For an example that includes this property, see the Interface IView.

Remarks

The property provides information about the type of the view. It indicates whether the view is an Animation type or a Chart type. This can be useful when searching for specific types of views within a page. The available options are:

Methods

Activate()

Activates the view.

void Activate()

Examples

For an example that includes this property, see the Interface IView.

Remarks

The method is used to activate the selected view. When this method is called, it deactivates any currently active views within the same page and sets the selected view as the only active view. There can be only one active view at a time.

DockTo(DockLayout, IView)

Moves the view to a specified position relative to another view.

void DockTo(DockLayout dockLayout, IView target)

Parameters

dockLayout DockLayout

Specifies the position where the current view should be docked relative to the target view. The available options are:

target IView

The view relative to which the current view will be docked.

Examples

For an example that includes this property, see the Interface IView.

Remarks

The method is used to move the current view to a new position relative to another view. The position is specified using the dockLayout parameter, which determines the direction (Top, Bottom, Left, Right) where the current view will be docked in relation to the target view.

ExportImage(string, ImageFormat, double?, double?)

Exports the image to the specified file path in the specified format.

void ExportImage(string filepath, ImageFormat format, double? width = null, double? height = null)

Parameters

filepath string

The path where the image file will be saved.

format ImageFormat

The format in which the image will be saved. Supported formats are Png, Jpeg, and Bmp. The available options are:

width double?

The optional width for the exported image. If not specified, the original width is used.

height double?

The optional height for the exported image. If not specified, the original height is used.

Examples

For an example that includes this property, see the Interface IView.

Remarks

This method allows you to export an image to a desired file path in a specified format. Supported formats are Png, Jpeg, and Bmp. You can also specify the desired dimensions for the exported image. If width or height is not provided, the original dimensions of the image will be used.

Connect with Ansys