mdlIModel AddNewAnalysis
Adds a new analysis from an existing or new definition/data file.
Syntax
mdlIModel_handle AddNewAnalysis new_handle, varname, label, data_file_path, def_file_path, create_new_def_file, def_name def_type
Application
MotionView Tcl Modify
Description
This command adds a new analysis using the 'varname', 'label' arguments from an existing or new data and definition file.
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 to the data file.
- def_file_path
- The full file path to the definition file.
- create_new_def_file
- This is boolean variable that can take true or
false.
- true
- The ‘def_file_path’ will be created (or replaced if it already exists).
- false
- The ‘def_file_path’ should already be present.
- def_name
- The name of analysis definition.
- def _type
- The type of 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 AddNewAnalysis ana_handle ana_0 "\"Analysis 0\"" "C:/temp/data_file.mdl" "C:/temp/def_file.mdl" true ana_def_name analysis_type;
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.