mdlIModel AddAnalysis

Adds a new analysis from an existing data file.

Syntax

mdlIModel_handle AddAnalysisnew_handle varname label data_file_path

Application

MotionView Tcl Modify

Description

This command adds a new analysis using the 'varname', 'label', and 'data_file_path' arguments.

Inputs

new_handle
The handle of the newly created analysis.
varname
The variable name for the analysis.
label
The label of the analysis.
data_file_path
The full file path that will be used to create the analysis.

Example

To add a new analysis from an existing data file:
hwi GetSessionHandle mySessionName 
mySessionName GetProjectHandle myProjectName 
set activePageNum [myProjectName GetActivePage]
myProjectName GetPageHandle myPageName $activePageNum
set activeWinNum [myPageName GetActiveWindow]
myPageName GetWindowHandle myWindowName $activeWinNum
myWindowName GetClientHandle myClientName 
myClientName GetModelHandle myModelName 
myModelName AddAnalysis ana_handle ana_0 "\"Analysis 0\""  C:/temp/data.mdl;
ana_handle ReleaseHandle;
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle

Errors

Returns the handle of the newly created analysis if successful. If there is an error, an error code will be returned.