poIQueryIterator GetDataList--> Need to get the Component ID
Hi..
I am trying to create a TCL script for postprocessing in Hyperview.
I need to get the component ID for the corresponding Node ID which Is showing maximum displacement . I am able to retrieve the node Id and maximum displacement value, but could not retrieve the corresponding component ID.
Thanks in advance
Answers
-
Hi Emil,
Could you please share the command you're using to query node ID and Maximum displacement.
0 -
hi..
below is the kind of commands I have used. I am able to get the maximum displacement value and node ID .. But I am not able to get the parent Component ID for the corresponding Node
0 -
Hi Emil,
You can query component.id too, so:
qry$w SetQuery 'component.id contour.value';
qry$w GetIteratorHandle itr$w
For more info please refer:
0 -
Hi Livil,
Thanks a lot for your reply..I tried to use the above command and retrieve the component ID to print it in a 'Note Handle'. But I am getting some error. below is the part of the script I have used.
######################################################
set msr_max [lindex [m1$w GetEntityList] 1]
qry$w SetQuery 'component.id contour.value'
qry$w SetSelectionSet [s1$w GetID]
qry$w GetIteratorHandle itr$w;
set datalist [itr$w GetDataList];
itr$w Next
set componentid [lindex $datalist 0]
puts $componentid
puts 'check query'
set note_id [client$w AddNote]
set n_handle [client$w GetNoteHandle n$w $note_id]
n$w SetAttachment 'node $msr_max'
puts $msr_max
n$w SetPosition 1 1
n$w SetBorderThickness 2
n$w SetLabel 'Max Contour value'
n$w SetText 'NodeID {entity.id} \nContour_Value {entity.contour_val} \n {entity.component_id}'.#############################################################################
0 -
I need to get get the component ID and make that specific component alone in OPAQUE mode and remaining all parts in transparent view..
0 -
Could you please run it line by line and share the error and the line in which it occurs.
0 -
The script is not showing any error as such and is completing .. but I am not getting the desired output below isthe explanation happening at line#8 and line #17
######################################################
1. set msr_max [lindex [m1$w GetEntityList] 1]
2. qry$w SetQuery 'component.id contour.value'
3. qry$w SetSelectionSet [s1$w GetID]
4. qry$w GetIteratorHandle itr$w;
5. set datalist [itr$w GetDataList];
6. itr$w Next
7. set componentid [lindex $datalist 0]
8. puts $componentid ---------------->#### Nothing is getting pritted in this line##
9. puts 'check query'
10. set note_id [client$w AddNote]
11. set n_handle [client$w GetNoteHandle n$w $note_id]
12. n$w SetAttachment 'node $msr_max'
13. puts $msr_max
14. n$w SetPosition 1 1
15. n$w SetBorderThickness 2
16. n$w SetLabel 'Max Contour value'
17. n$w SetText 'NodeID {entity.id} \nContour_Value {entity.contour_val} \n {entity.component_id}' -------->## in the note handle it is Printed like' unknown symbol' entity.componet_id''.#############################################################################
0 -
Hi Livil,
Is the above info you were asking for?
0 -
Hi,
Try following this order
1. set msr_max [lindex [m1$w GetEntityList] 1]
2. qry$w SetQuery 'component.id contour.value'
3. qry$w SetSelectionSet [s1$w GetID]
4. qry$w GetIteratorHandle itr$w;5. while {[itr$w Valid]} {
6. set datalist [itr$w GetDataList];
7. set componentid [lindex $datalist 0]
8. puts $componentid
9. itr$w Next
10. }
0 -
Thanks for the reply.. I tried what you have shared.. still it is not working
the script is skipping the above while loop and completing .. not sure where it is going wrong
0 -
Also one more help I need.. If I know a particular component ID, and I need to keep that alone in Opaque mode and remaining all components in TRANSPARENT mode..
I tried to refer poIRenderOptions, but could not find any specific command for this
0 -
try these.
poIModel_handle SetPolygonMode Transparent
poIModel_handle SetPolygonMode 'opaque'
0 -
thanks Livil.. It worked
0