poIQueryCtrl WriteData
Writes the query results to the specified file in .csv format.
Syntax
poIQueryControl_handle WriteData filename
Application
HyperView Tcl Modify
Description
This command writes the query results to the specified file in .csv format.
Inputs
- filename
- The complete file path.
Example
To write a results
file:
hwi GetSessionHandle mySessionName
mySessionName GetProjectHandle myProjectName
set pageIndex [myProjectName GetActivePage]
myProjectName GetPageHandle myPageName $pageIndex
set windowIndex [myPageName GetActiveWindow]
myPageName GetWindowHandle myWindowName $windowIndex
myWindowName GetClientHandle myPostName
set modelIndex [myPostName GetActiveModel]
myPostName GetModelHandle myModelName $modelIndex
myModelName GetResultCtrlHandle myResultName
myModelName GetQueryCtrlHandle myQueryName
myModelName GetSelectionSetHandle mySetName [myModelName
AddSelectionSet element]
mySetName Add all
myResultName SetCurrentSimulation 1
myQueryName SetDataSourceProperty result datatype Stress
myQueryName SetDataSourceProperty result shelllayer Upper
myQueryName SetQuery "element.id,result.value"
myQueryName SetSelectionSet [mySetName GetID];
myQueryName WriteData {c:/temp/d.txt};
Errors
Returns 0 if successful, or an error code (HW_InvalidHandle) if the handle used to invoke the method is no longer valid.