Add User Exits
In the tclincludes folder, create any Tcl file that implements the following methods:
::hw::pmgr::pmt::PmgrOnNewPost
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnNewPost
##
##Synopsis:
## This procedure will be called by PMGR whenever you create a
## new process instance. It will be called after the PMGR engine
## actually creates a new process instance
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
::hw::pmgr::pmt::PmgrOnOpenPost
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnOpenPost
##
## Synopsis:
## This procedure will be called by PMGR whenever you open an
## existing process instance. It will be called after the PMGR
## engine actually reopens the process instance
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
::hw::pmgr::pmt::PmgrOnSavePre
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnSavePre
##
## Synopsis:
## This procedure will be called by PMGR whenever you choose
## to save the process instance.
## It will be called before the PMGR engine actually saves the
## process instance.
##
## Input arguments:
## None
##
## Return:
## None
####################################################################
::hw::pmgr::pmt:: PmgrOnReplayPre
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnReplayPre
##
## Synopsis:
## This procedure will be called by PMGR whenever you choose
## to replay the process instance.
## It will be called before the PMGR engine actually replays the
## process instance.
##
## Input arguments:
## None
##
## Return:
## None
####################################################################
::hw::pmgr::pmt::PmgrOnNewPre
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnNewPre
##
## Synopsis:
## This procedure will be called by PMGR prior to performing a "New" project creation.
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
::hw::pmgr::pmt::PmgrOnOpenPre
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnOpenPre
##
## Synopsis:
## This procedure will be called by PMGR prior to the "Open" of a project instance.
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
::hw::pmgr::pmt::PmgrOnOpenPost
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnOpenPost
##
## Synopsis:
## This procedure will be called by PMGR after opening a project instance and before the initialization of the active task.
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
::hw::pmgr::pmt::PmgrOnSavePost
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnSavePost
##
## Synopsis:
## This procedure will be called by PMGR after a successful Save is performed. This lets the template writer revert back the specific states of variables or make specific function critical implementation after a successful save.
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
::hw::pmgr::pmt::PmgrOnClose
#######################################################################
##
## Procedure name: ::hw::pmgr::pmt::PmgrOnClose
##
## Synopsis:
## This procedure will be called by PMGR after the close of a project instance. This enables the template writer to perform any clean-up to be done after the closing of the project instance.
##
## Input arguments:
## None
##
## Return:
## None
#######################################################################
It can be seen that the APIs provided to the Tcl modules is a much smaller set, compared to what the Java beans get (from the IHWMFrameWork).
The Tcl modules can use the PmgrExecuteJavaScript method to do anything that the Java Beans can do.
proc ::hw::pmgr::${::hw::pmgr::namespace}::Exec {}
variable id;
# Start a new HM session and establish communication with it
str strHMPath "D:/Altair/hw8.0/hm/bin/WIN32/hmopengl.exe"
set strJavaCmd "GetCommMgr().StartHM( \
\"$strHMPath\", null, null, \"MY_HM_SESSION\")";
::hw::pmgr::PmgrExecuteJavaScript $id $strJavaCmd nSuccess;
if {$nSuccess == 0}
tk_messageBox -message "Error in starting HM;
return -1;
}
return 0;
}