Simcenter 3D Motion Results Reader COM Interface Setup for MATLAB (64 Bit)

2023-05-08T16:45:51.000-0400

Summary

This article describes and shows the step-by-step setup process for Simcenter 3D Motion Results Reader (MRR) COM interface for MATLAB, in order to perform post-processing operations using the Motion Results in MATLAB through scripting.


Details


The Motion Results Reader COM for MATLAB package is a COM server that lets you open and browse Motion Results files from MATLAB.

Setup steps

The following setup steps are also shown in the video.

  1. Unpack the MRR_APICOM.zip file, located in the Simcenter 3D (or NX) installation at:
    • %SC3D_INSTALL_DIR%\MECH\motionsolver\MRR_APICOM.zip
  2. Copy all the files:
    • From: ..\MECH\motionsolver\MRR_APICOM\MRR_API_COM_64
    • To: ..\MECH\motionsolver\
  3. Run the following commands in an administrator mode command prompt from the ..\MECH\motionsolver\ location to first unregister the old library and then register the new library:
    • regsvr32 /s /u MotionResultsReaderCOM.dll
    • regsvr32 /s MotionResultsReaderCOM.dll

Testing out the setup

For using the Motion Results Reader interface in MATLAB, it must be first initialized as an Active X Server object.

Note that if the MRR COM setup was not completed successfully, the initialization step will fail, as the required *.dll files will not be found by MATLAB in the registry.

Use the following commands in MATLAB to initialize Motion Results Reader and load a set of results file (*.mres file) of your choosing:
% This is a comment.
%% Initialize MRR by starting an Active X Server
% Assumes MRR was added to the Registry during the 1-time setup
mres_file = actxserver("MotionResultsFile.object");
%% Load results file to the initialized object.
mres_file.OpenFile("MyResults.mres");
    

Note:

This functionality (Motion Results Reader COM for MATLAB) and its workflow should not be confused with the Mechatronics Co-simulation with MATLAB topic. The Motion Results Reader COM for MATLAB functionality can be used for post-processing any sets of Motion Results (*.mres) by MATLAB scripting, independent of how the results were obtained.

KB Article ID# KB000111911_EN_US

Contents

SummaryDetails

Associated Components