mdlIObject AddNewExternalSystem
Adds a new definition type entity (System, Template, Dataset, Graphic system or Analysis).
Syntax
mdlIObject_handle AddNewExternalSystem new_handle, keyword, varname, label, file_path def_name
Application
MotionView Tcl Modify
Description
This command creates a new external system and adds it to the model. The result of this command (if successful) will be the addition of a System in the model and a new file specified by the ‘file_path’ argument in the command.
Inputs
- new_handle
- The handle of the newly created external system.
- keyword
- The type of external system (System, Template, Dataset, Graphic or Analysis) which will be created.
- varname
- The variable name of the system which will be created.
- label
- The label of the system which will be created.
- file_path
- The file to which the system definition will be output to.
- def_name
- The definition name of the system which will be created.
Example
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 GetObjectHandle obj_handle
obj_handle AddNewExternalSystem ext_sys_handle0 Template tmpl_0 "\"Template 0\"" C:/temp/tmpl.mdl def_sys_0;
obj_handle AddNewExternalSystem ext_sys_handle1 System sys_0 "\"System 0\"" C:/temp/sys.mdl def_sys_0;
ext_sys_handle0 ReleaseHandle;
ext_sys_handle1 ReleaseHandle;
obj_handle ReleaseHandle;
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
Errors
Returns the handle of the newly created system if successful. If there is an error, an error code will be returned.