Skip to main content

Motion Standalone Postprocessor C# library 2026 R1

Interface IOperationsHeatmapNumericAxis2DViewModel

Last update: 09.03.2026

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

Interface for managing axes in a 2D Numeric Heatmap related to STFT.

public interface IOperationsHeatmapNumericAxis2DViewModel

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.

# IOperationsHeatmapNumericAxis2DViewModel.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")

# Set array about combination of characteristic and component
curvePaths = List[str]()
curvePaths.Add(r'Displacement/Magnitude')

# Create a PlotParameters object to specify the parameters for the plot.
# Set the Entity to Plot.
# The Target is the name of the target for which you want to retrieve the curves.
# Set the paths for the curves you want to retrieve.
# This is where you specify the characteristics and components you want to plot.
parameters = PlotParameters()
parameters.Paths = curvePaths
parameters.Target = "Crank"

# Add Curves (FilePath, Curve Parameter)
# FilePath - The path of the result to access.
# parameters - The class used as a parameter of the AddCurve function.
# The instance of the curve.
curves = chartView.AddCurves(result_file_path, parameters)

# Documentation Example
# create_fft.py
# SeriesNames - The list of the curve name to perform the operation
# FFTType - Magnitude, Phase
# FFTWindowType - Rectangular, Triangular, Bartlett, Hanning, Hamming, Welch, BlackMan, None
# ScaleType - Original, Logarithm, Decibel
# Points - The number of data point for FFT
# Start - The start time for using FFT on target data series
# End - The end time for using FFT on target data series
ffts = chartView.CreateFFT(curves, FFTType.Magnitude, FFTWindowType.Rectangular, ScaleType.Original, 128, 0, 1.0)

fftNames = List[str]()
fftNames.Add(ffts[0].SeriesName)

# SamplingFrequency  - the number of the interval for dividing Y direction grids on color map.
# TimeSlice - the number of the interval for dividing  X direction grids on color map.
# Overlap - the value of the percentage for setting overlapped intervals.
# SelectedPoints - the number of data point for FFT.
# Start - the start time for using FFT on target data series.
# End - the end time for using FFT on target data series.
# ReferenceValue - the reference value on decibel as the type of the scale.
# ScaleFactor - the scale factor to change from time domain to another domain.
# SelectedScaleType - the scale type of STFT. STFT Scale Type has Original, Decibel.
data = HeatMapSTFTDataViewModel()
data.SamplingFrequency = 100
data.TimeSlice = 0.05
data.Overlap = 50
data.SelectedPoints = 16384
data.Start = 0
data.End = 1.000000000001
data.ReferenceValue = 1E-05
data.ScaleFactor = 1.0
data.SelectedScaleType = STFTScaleType.Original
stftViews = chartView.CreateSTFT(data, fftNames)

axis = stftViews[0].STFT2DViewModel.GetAxis("Frequency (Hz)")
axis.FontColor = Colors.Red
axis.FontFace = FontFamily("Arial")
axis.FontSize = 16
axis.FontStyle = OperationAPIService.GetFontStyleFromString("Italic")
axis.FontWeight = OperationAPIService.GetFontWeightFromString("Bold")
axis.ScaleInterval = 5.0
axis.ScaleMax = 100
axis.ScaleMin = 10

if axis.General == False :
    axis.Digit = 2
    axis.LabelFormatType = LabelFormatType.Number

# Close the Pages
page.Close()

# Close Document
applicationHandler.CloseDocument(result_file_path)

Properties

Digit

Gets or sets the number of digits for the label format.

int Digit { get; set; }

Property Value

int

Examples

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

Remarks

Use this property to specify or retrieve the number of digits displayed in the labels on the axis.

FontColor

Gets or sets the font color of the axis.

Color FontColor { get; set; }

Property Value

Color

Examples

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

Remarks

This property is part of the "Chart" category and allows you to customize the appearance of the axis by changing its font color. You can set this property to any valid value.

FontFace

Gets or sets the font family for the axis labels.

FontFamily FontFace { get; set; }

Property Value

FontFamily

Examples

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

Remarks

Use this property to specify or retrieve the font family used for the labels on the axis.

FontSize

Gets or sets the font size of the labels on the axis.

double FontSize { get; set; }

Property Value

double

Examples

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

Remarks

Use this property to specify or retrieve the font size of the labels displayed on the axis.

FontStyle

Gets or sets the font style for the axis.

FontStyle FontStyle { get; set; }

Property Value

FontStyle

Examples

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

Remarks

Use this property to specify or retrieve the font style used for the axis. The available options are:

FontWeight

Gets or sets the font weight for the labels on the axis.

FontWeight FontWeight { get; set; }

Property Value

FontWeight

Examples

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

Remarks

Use this property to specify or retrieve the font weight of the labels displayed on the axis. The available options are:

General

Gets or sets a value indicating whether the label format is set automatically or manually.

bool General { get; set; }

Property Value

bool

Examples

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

Remarks

If this property is set to true, the and properties cannot be set. Use this property to specify whether the label format should be determined automatically or manually.

LabelFormatType

Gets or sets the format type for the labels on the axis.

LabelFormatType LabelFormatType { get; set; }

Property Value

LabelFormatType

Examples

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

Remarks

Use this property to specify or retrieve the format type for the decimal values displayed in the labels on the axis. The available options are:

ScaleInterval

Gets or sets the scale interval of the axis.

double ScaleInterval { get; set; }

Property Value

double

Examples

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

Remarks

Use this property to manually set the intervals for the axis range.

ScaleMax

Gets or sets the maximum value of the axis scale.

double ScaleMax { get; set; }

Property Value

double

Examples

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

Remarks

Use this property to manually set the maximum value for the axis scale.

ScaleMin

Gets or sets the minimum value of the axis scale.

double ScaleMin { get; set; }

Property Value

double

Examples

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

Remarks

Use this property to manually set the minimum value for the axis scale.

Connect with Ansys