mdlIObject InterpretEntity

Adds a new entity using the MDL statements keyword, variable name, and label.

Syntax

mdlIObject_handle InterpretEntity new_handle, keyword, varname, label

Application

MotionView Tcl Modify

Description

This command adds a new entity using the MDL statements keyword, variable name, and label. You can specify the new entity's type, variable name, and label, as well as other topology arguments.

Inputs

new_handle
The handle for the new entity.
keyword
The new entity's MDL statement keyword.
varname
The new entity's variable name.
label
The new entity's label.

Example

To create a new body (b_0) with the label "My Body":
hwi OpenStack
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 InterpretEntity new_handle Body b_0 "\"My Body\" "
new_handle ReleaseHandle
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
hwi CloseStack

Errors

Returns 0 if successful, otherwise an error code.