how to build a curve in HyperGraph by Tcl commands
Hi, Guys!
I want to build curves in HyperGraph2D by tcl commands and API commands. But there is no any curves in plot after I had set all the options. The core code is as follows:
set t [clock click];
set pch_filename "E:/CalculateDynamicStiffness/subframe_front_E90000.pch";
hwi OpenStack;
hwi GetSessionHandle sess_$t;
sess_$t GetProjectHandle proj_$t;
proj_$t GetPageHandle page_$t [proj_$t GetActivePage];
page_$t GetWindowHandle win_$t [page_$t GetActiveWindow];
win_$t GetClientHandle plot_$t;
plot_$t AddCurve;
plot_$t GetCurveHandle curve_$t [plot_$t GetActiveCurve];
curve_$t GetVectorHandle xvec_$t x;
curve_$t GetVectorHandle yvec_$t y;
xvec_$t SetType "file";
xvec_$t SetFilename $pch_filename;
xvec_$t SetSubcase 0;
xvec_$t SetDataType "Displacements";yvec_$t SetType "file";
yvec_$t SetFilename $pch_filename;
yvec_$t SetSubcase 0;
yvec_$t SetDataType "Displacements";
yvec_$t SetComponent {MAG | X-Trans};
curve_$t SetLabel "Point id 1021";
plot_$t Draw;
As shown in the figure above, the modules in the red circle are successfully set through the above code. But I couldn't find the specified API command to realize "Apply" function (in black circle). Please help me to solve the problem. It will be appreciated for any reply!!!
Answers
-
I have solved this problem. It is the API command called "Recalculate" to realize the "Apply" function. By it, I build desired curves successfully. I just need to add the API command(plot_$t Recalculate) on the penultimate line of the above code.
1 -
Hello sir, I am working on same project of automation in Hyperworks and facing certain issues. Is there any way to get in touch with you ?
0