Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Automatic curve generation in HyperGraph

Automatic curve generation in HyperGraph

Automatic curve generation in HyperGraph

Hi, guys!
I want to build multiple curves automatically in HyperGraph through secondary development. But I find that the API command "pltIBuildPlotsCtrl GenerationPlots" doesn't seem to be able to generate curves. Please help find the reason. The core codes are as follows:

set t [clock click];
hwi OpenStack;
hwi GetSessionHandle sess_$t;
sess_$t GetClientManagerHandle mgr_$t Plot;
mgr_$t GetBuildPlotsCtrlHandle build_$t;
build_$t SelectDataFile "E:/CalculateDynamicStiffness/subframe_front_E90000.pch" false;
set subcaselist [build_$t GetSubcaseList];
set xDatatype {Frequency [Hz]};
set yDatatype {Displacements};
foreach subcase $subcaselist {
build_$t SetSubcase $subcase;
build_$t SetXDatatype $xDatatype;
build_$t SetYDatatype $yDatatype;
build_$t SelectYComponents {"MAG | X-Trans"};
build_$t GeneratePlots;#This command is invalid!
hwi CloseStack;

The return value of each command is 0 or a string. Thanks for your help!!!

RE: Automatic curve generation in HyperGraph

I have solved this problem. It is the API command called "Recalculate" to realize the "Apply" function. By it, I build desired curves successfully. 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};

plot_$t Recalculate;
plot_$t Draw;

I still can't realize the function of automatic output curve through “pltIBuildPlotsCtrl Class” and wealth. But through the pltICurve Class, I realized the function I wanted, the code is as above.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close