I am currently working on customizing a macro in order to display the “Query” of the following results (Component ID, Component name, Contour (stress/strain)). The ultimate goal is to export these results into a text file named "table.txt" using TCL script as depicted in the attached image.
I have attached the script, While I have successfully managed to print the Component ID and Component name but not the Contour values (maximum and ID).
I am using HyperView 2021.2 version and Radioss solver.
Can anyone help me ? I can provide more info if necessary.
Also is there any other method where I can extract the Maximum Stress/strain value per component using TCL script ? (Function is very similar to Interactive "Query" table in Hyperview, but I want to perform that operation couple of times on several Hyperview pages/windows.
I did contact the Altair support for the same but there is no satifactory solution on my problem (by using TCL function), Although they suggested using an interactive "Query" table in Hyperview and export results. I am looking a way to automize this step.
Thanks in advance
TCL Code:
mod GetQueryCtrlHandle query1
mod GetSelectionSetHandle mySetName [mod AddSelectionSet component]
mySetName Add all
res SetCurrentSimulation 1
query1 SetDataSourceProperty result datatype Stress
query1 SetDataSourceProperty result shelllayer Upper
query1 SetQuery "component.id component.name contour.value result.value"
query1 SetSelectionSet 1
query1 WriteData {C:/Desktop/table.txt};
anim Draw
#############################
############################
query1 GetQuery