TCL command to check for displacement Query for Node By Set
Hi,
I am trying to write a TCL script for postprocessing.
I am stuck in between, where in I am looking to get the displacement of a node.
In stead of getting the maximum displacement node, I need to get the displacement of a particular node for which a set is defined.
<?xml version="1.0" encoding="UTF-8"?>
can anyone help me on this.
Thanks in advance
Emil
Find more posts tagged with
Sort by:
1 - 3 of
31
You have to initialize the iterator before getting data. Typically, the code becomes:
qc$j GetIteratorHandle iter$j for {iter$j First} {[iter$j Valid]} {iter$j Next} { iter$j GetDataList }
If you have only one node to query about value, the following code will also work:
qc$j GetIteratorHandle iter$j iter$j First set datalist [iter$j GetDataList]
Please give it a try.
Hi Emil,
One typical approach is to draw contour of the data type you want to get (e.g. Displacement) and query values with poIQueryCtrl and poIQueryIterator classes. You can find the following sample code in the user reference guide:
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 GetSelectionSetHandle mySetName [myModelName AddSelectionSet element] myModelName GetQueryCtrlHandle myQueryName myQueryName SetSelectionSet [mySetName GetID] myQueryName SetQuery 'node.id result.value'
If you already have a set of target nodes, set its ID to the query ctrl handle.
Another is to access result values directly with hwIDataFile class. Please find the sample code in the reference guide as well.
Regards,