Skip to main content

Motion Standalone Postprocessor C# library 2026 R1

Interface IOperationsChartViewModel

Last update: 09.03.2026

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

Represents the base interface for properties and methods that make up a chart view.

public interface IOperationsChartViewModel : IView

Implements

IView

Examples

For an example that includes information about interfaces, see this example. To view the examples, refer to the location of the 'Install_Path\Motion\Document\Postprocessor API for Python.zip' file.

# IOperationsChartViewModel.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()

# Creating a Chart
# Create a new Chart View on the page
# This will create a new chart view with the specified name.
chartView = page.CreateChart("Chart")

chartView.Legend.Background = Colors.Red
chartView.Legend.FontColor = Colors.Black
chartView.Legend.FontFace = FontFamily("Arial")
chartView.Legend.FontSize = 15
chartView.Legend.FontStyle = OperationAPIService.GetFontStyleFromString("Italic")
chartView.Legend.FontWeight = OperationAPIService.GetFontWeightFromString("Bold")
chartView.Legend.LegendPlacement = LegendPlacementType.Bottom
chartView.Legend.ItemsInFilter = "Visible Curves"

# Close the Pages
page.Close()

# Close Document
applicationHandler.CloseDocument(result_file_path)

Properties

Legend

Get or sets the legend for the chart.

IOperationsLegendModifier Legend { get; }

Property Value

IOperationsLegendModifier

Examples

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

Remarks

The Legend property allows you to control the appearance and behavior of the chart's legend. Through this property, you can access various attributes of the legend and adjust them to fit your specific requirements.

Methods

ImportNumeric(string, List<INumericParameter>)

Imports curve data from an external file and adds the curves to the chart view.

void ImportNumeric(string filepath, List<INumericParameter> targets)

Parameters

filepath string

The path to the file containing the exported curves. Supported file formats include (*.txt, *.csv, *.out, *.rsp).

targets List<INumericParameter>

A list of objects that specify the parameters for the curves to be created.

Examples

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

Remarks

This method reads curve data from the specified file and adds the corresponding curves to the chart view. Each in the targets list contains the following properties:

  • NameThe name of the curve to be created.
  • TargetXThe path to the data for the X-axis.
  • TargetYThe path to the data for the Y-axis.

Connect with Ansys