can i create new subresult in Hyperview using tcl ? and if yes how or where is the ressource for the tcl commande line

Timothe Manrique
Timothe Manrique Altair Community Member
edited August 2023 in Community Q&A

Hello 

the title is pretty much self explenatory.

Can i create new subresult (or new result type that i can fill it work too) in Hyperview using tcl scripting and where is the tcl scripting ressouce where i can find all the class,function, property and attribut?

 

Thanks

Answers

  • Rishabh Awasthi_20948
    Rishabh Awasthi_20948
    Altair Employee
    edited August 2023

    Hello Timothe 

     Can you try the poIResultMathCtrl Class in Hyperview which to create a new result type. poIResultMathCtrl SetEquation creates a math equation. 

    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

    set mid [client_handle AddResultMathAnalysis "c:/samples/bumper/d3plot" "c:/samples/bumper/d3plot"]

    client_handle GetModelHandle model_handle $mid
    model_handle GetResultCtrlHandle result_handle
    result_handle GetResultMathCtrlHandle rmath_handle

    set eid [rmath_handle AddExpression]
    rmath_handle GetExpressionHandle exp_handle $eid

    exp_handle SetEquation {Stress+2} original # original form
    exp_handle SetEquation {T1+2} alias        # alias form

    exp_handle SetEquation {sqrt(Stress+2)} original
    exp_handle SetEquation {sqrt(T1+2)} alias

    exp_handle SetEquation {LC1F1.Stress.xx.Lower – LC1F3.Stress.yy.Upper} original
    exp_handle SetEquation {Stress.xx + Stress.yy} original

    hwi CloseStack                                                                                                                                                                 

    The scripting resource for Hyperview is present in Hyperworks Reference Guides -> Tcl/Tk commands . Link. (https://help.altair.com/hwdesktop/hwd/topics/chapter_heads/tcl_tk_commands_r.htm)

    Hyperview APIs : https://help.altair.com/hwdesktop/hwd/topics/chapter_heads/tcl_tk_commands_r.htm

    Best Regards

    Rishabh

  • Timothe Manrique
    Timothe Manrique Altair Community Member
    edited August 2023

    Thank for you quick answer. 

    If i comprehend the  poIResultMathCtrl Class allow me to applie equation on my whole set , or i would prefere to do it node by node because i know what transformation need to be made (or the result the node should have)  but it doesn't apply to the whole model or even a whole componant. it quite the local transformation i need to do.

     

    Best regards.