mdlIObject AddSystemFromImportedInlinedDef

Adds a new system from an existing definition file.

Syntax

mdlIObject_handle AddSystemFromImportedInlinedDefnew_handle, varname, label, existing_file_path, existing_def_name

Application

MotionView Tcl Modify

Description

This command adds a new System using an existing definition. The definition should be present in a file which will be provided as the argument ‘existing_file_path’. The file ‘existing_file_path’ should have the same definition name as ‘existing_def_name’ in order to create the System successfully.

Inputs

new_handle
The handle of the newly created system.
varname
The variable name for the system which will be created.
label
The label for the system.
existing_file_path
The path of the existing external system file.
existing_def_name
The definition name of the system. The name should be the same as the ‘existing_file_path’ name.

Example

To add a new system from an existing definition 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 GetObjectHandle obj_handle
obj_handle AddSystemFromImportedInlinedDef tmp_handle sys_1 "\"SYSTEM 1\"" C:/temp/system.mdl def_sys_0
tmp_handle 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.