🎉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

how to build a curve in HyperGraph by Tcl commands

User: "Zaily"
Altair Community Member
Updated by Zaily

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;

image

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!!!

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Zaily"
    Altair Community Member
    OP
    Updated by Zaily

    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. 

    User: "Neil Handa"
    Altair Community Member
    Updated by Neil Handa

    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 ?