mdlIObject AppendMdltoSystem
Appends MDL statements to the System.
Syntax
mdlIObject_handle AppendMdltoSystem mdl_statement
Application
MotionView Tcl Modify
Description
This command appends the MDL statements to any system or assembly within the model.
Inputs
- mdl_statement
- The MDL statement that has to be appended to the model.
Examples
Example
One:
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 syshandle System sys_0 \"System 0\" def_sys_0
syshandle AppendMdltoSystem "*Point(p_0,\"Point 0\")"
syshandle ReleaseHandle
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
Example Two:
To create a system (sys_1) in the
Model:
::model::GetClientHandle cli
cli GetModelHandle mod
mod GetChildHandle sys sys_1
sys AppendMdltoSystem "*Point(p_1,\"Point 1\")
*Point(p_2,\"Point 2\")
*SetPoint(p_1,40,40,40)
*SetPoint(p_2,50,50,50)
*Point(p_3,\"P3\")
*SetPoint(p_3,150,150,150)
*Body(b_0,\"BD1\")"
sys ReleaseHandle
mod ReleaseHandle
cli ReleaseHandle
Errors
Returns 0 if successful.