Accelerate and simplify your post-processing scripts with HyperView and HyperGraph

Michael Herve_21439
Michael Herve_21439
Altair Employee
edited June 2023 in Altair HyperWorks

About Native tcl programming

Let me start first to say few words about tcl automation in HyperView, HyperGraph, TableView, ...

It is object oriented, which means anything from the session, the page, the model, the x or y vector of a curve, has to be defined with an object, which we call an handle in HyperWorks terminology.

Once the handle defined, then you can apply any command related to this object either a query or an action command.

For these automations, the following online help page is a must-know: Object Hierarchy

image

Each cell contains a dynamic link to all methods available for this handle:

image

This object-based organization requires some efforts for generating scripts. Let's say you want to plot a curve, you have to define a handle at least for your client, your datafile, your vector, your x vector and your y vector.

Plus, and opposed to HyperMesh command file, there was no journal file storing the tcl commands to help the user authoring his script.

How hwc helps saving authoring time and simplyfing script?


Hwc is a comprehensive programming layer which comes in the addition of native core tcl commands.
Hwc commands are recorded in the session and are available in the hwc command:

 

image


Hwc is not covering yet all interactive capabilities in HyperView and HyperGraph, but we are completing the covering at each version.

In version 2022.3, hwc support includes (non exhaustive list):

- Session/Flexible Report handling

- Adding pages, changing layout (number of window per pages), navigating between windows

- HyperView: Import of results and contour, Iso, legend edition, Measures, Notes, Hotspot Finder, Derived Loadcases

- HyperGraph: Import of curves, modifications of curve attributes in HyperGraph, Datums and lines, StackMath operations

 

For pushing the hwc commands to tcl, select your hwc commands in the hwc console, then right click -> Copy to Tcl.

 

image

Where can hwc help me save time and simplify my scripts:

- It allows bulk changes, eg load multiple curves in a single command, see video below:



https://www.youtube.com/watch?v=FWnMm7lpWz0


also you can apply bulk changes on curve names or attributes, ...

- More flexible loading of report template/flexible report:



https://www.youtube.com/watch?v=uMeBNfEeIAk

-Apply bulk changes on some entities such as notes, ...:


https://www.youtube.com/watch?v=UT6qlraiZ_g

Full coverage of features such as Measures, HotSpot Finder and Report, which help you to automate quicker these features.
For instance, even if you do not want to populate a presentation or document from the Report, you can still use his looping capabilities (over components, sets and loadcases) to generate faster screenshots.

Where do I still need native tcl commands?

Here is a list of regular actions where you need to deal with core tcl commands:

- query of contours in HyperView

- query of data (data type, request, component) in a time history file

- operations between multiple curves in HyperGraph