Interface IView
Last update: 09.03.2026Namespace: 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
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
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
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
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
Methods
Activate()
Activates the view.
void Activate()
Examples
For an example that includes this property, see the Interface IView.
Remarks
The
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 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.