Skip to main content

Motion Standalone Postprocessor C# library 2025 R2

Interface IOperationsVectorDisplayViewModel

Last update: 16.07.2025

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

Interface representing information for the vector display view model.

public interface IOperationsVectorDisplayViewModel : IOperationsVectorDisplayBaseViewModel

Implements

IOperationsVectorDisplayBaseViewModel

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.

# IOperationsVectorDisplayViewModel.py
import sys

current_dir = __file__.rsplit('\\', 1)[0]
external_modules_path = current_dir + '\\..\\..\\Modules'
sys.path.append(external_modules_path)

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
applicationHandler.AddDocument(filepaths)

# Find Page
pages = applicationHandler.GetPages()

findViews = list()
for page in pages :
    views = page.GetViews()
    animationViews = [view for view in views if view.ViewType == ViewType.Animation]
    for animationView in animationViews :
        if animationView.DocumentFilePath == result_file_path and animationView.AnalysisResultType == AnalysisResultType.Dynamics :
            findViews.append(animationView)

viewCount = len(findViews)
if viewCount > 0 :
    document = applicationHandler.GetDocument(result_file_path)
    analysis = document.GetAnalysisResultViewModel(AnalysisResultType.Dynamics)

    # Create Vector Display
    vector = analysis.CreateVectorDisplay("TJ_01", "Base Force")
    vector.Color = Colors.Red
    vector.IsLog = True
    vector.Scale = 1.5

# Close the Pages
pages = applicationHandler.GetPages()
for page in pages :
    page.Close()

# Close the Document
applicationHandler.CloseDocument(result_file_path)

Properties

Color

Gets or sets the color of the vector display.

Color Color { get; set; }

Property Value

Color

Examples

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

Remarks

Use this property to specify or retrieve the color of the vector display.

IsLog

Gets or sets a value indicating whether the log scale option is enabled.

bool IsLog { get; set; }

Property Value

bool

Examples

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

Remarks

Use this property to specify or retrieve whether the log scale option is enabled.

Scale

Gets or sets the scale of the vector display.

double Scale { get; set; }

Property Value

double

Examples

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

Remarks

Use this property to specify or retrieve the scale of the vector display.

Connect with Ansys