poIModel SetResult
Attaches the given result file to the model.
Syntax
model_handle SetResult file_name (reader_name)
Application
HyperView Tcl Import
Description
This command attaches the given result file to the model. Only one result file can be attached at any given time. The new result file overrides any previously attached one. The first registered reader that recognizes the file format will attempt to load it. If no reader was found to load the file, a proper message is displayed and a warning code is returned. In most cases, you don’t need to specify the reader name as a second argument. However, if you know that the file format can be recognized by more than one reader, you can specify the reader name as a second argument. You can get a list of available readers by using GetResultReaderList command.
Inputs
- file_name
- The result file name to be loaded.
- reader_name (Optional)
- Fully qualified reader name, for example “LS-DYNA d3plot Result Reader”.
Context
Example
hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle
client_handle GetModelHandle model_handle [client_handle GetActiveModel]
set file_name C:/Altair/hw/demos/mv_hv_hg/animation/dyna/bumper/d3plot
model_handle SetResult $file_name
hwi CloseStack
Errors
...
set file_name C:/Altair/hw/demos/mv_hv_hg/animation/dyna/bumper/d3plot
model_handle SetResult $file_name
if { [ catch { [model_handle GetResultCtrlHandle result_handle] }]} {
# error attaching result
return
}
# continue execution
...