🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

HV TCL customization to generate "derived results" by Expression Builder

User: "alpha_21885"
Altair Community Member
Updated by alpha_21885

Hi TCL experts

 

I am trying to use HV TCL commands to auto generate 'derived results' with Expression Builder ( 2 * stress + 1).

I usepoIResultMathCtrl” handle and “AddExpression” but the derived result did not appear in Contour result list.

 

Hope to get your input and advice from you.

Thank you in advanced.

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "Merula_20758"
    Altair Community Member
    Updated by Merula_20758

    +1 on this. Is there an example somewher?

    User: "Merula_20758"
    Altair Community Member
    Updated by Merula_20758

    bump

    User: "tinh"
    Altair Community Member
    Updated by tinh

    B)/emoticons/default_cool.png' title='B)' /> hmm..

    actually i rarely worked with hv. but it seems that you ask more and more about it...

    Try this way (I copy it from reference guide, you should read reference guide thoughtfully, all answers are there):

     

    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 Standard $YourModelFile.fem $YourModelFile.h3d]
    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

    #I don't know why {2*Stress+1} did not work. maybe 'Stress' is a sample, you should get alias of data by 

    #rmath_handle GetAlias

    #example T1.C7.L3 is middle vonMises 

    exp_handle SetEquation {2*T1.C7.L3+1}

     

    #now you don't see derived result, because you need to apply the equation by:

    exp_handle SetSubcase 1

    exp_handle Commit

     

    #it's ok.
    hwi CloseStack

     

     

    User: "Merula_20758"
    Altair Community Member
    Updated by Merula_20758

    Thanks for your help tinh!

     

    You know, I copied from the Reference Guide as you suggested, but as I opened my model with the 'ADDMODEL' Command, it didnt get the line:

    (result_handle GetResultMathCtrlHandle rmath_handle) which no I realized was the mistake in the code.

    Just in case another has troubles with that. You have to get your model id with: [ AddResultMathAnalysis  ... ]