HV TCL customization to generate "derived results" by Expression Builder
Hi TCL experts
I am trying to use HV TCL commands to auto generate 'derived results' with Expression Builder ( 2 * stress + 1).
I use “poIResultMathCtrl” 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.
Answers
-
+1 on this. Is there an example somewher?
0 -
bump
0 -
/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 CloseStack0 -
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 ... ]
0