2024.1
Overview of external readers and the Altair Binary Format, the generic ASCII reader, running applications in batch mode, using Tcl/Tk commands, translators, and result math.
This section contains details on general HyperWorks scripting concepts, along with documentation on the Tcl commands that can be used to query and modify the database and GUI.
Tcl (Tool Command Language), commonly pronounced "tickle", is a scripting language like Perl, JavaScript, Born, and Korn. Scripting languages are easy to use and learn because they have a syntax that is easy to read, are platform independent, and do not require compiling.
View new features for version 2024.1.
Learn the basics and discover the workspace.
Discover product functionality with interactive tutorials.
Extensions are programs integrated with the application to enhance or extend the user experience.
Altair Binary Format (ABF) is the standard binary format read by the program. A library called abflib allows you to create files in ABF.
A generic ASCII reader is now available which allows you to bring custom results directly into HyperView. The Altair ASCII format is useful for reading the results of any in-house or propriety codes which are saved in a generic format.
Batch mode allows you perform a series of operations outside the program interface.
External resources can be registered in preference files, session files, or Templex files. If an external resource is registered in a program session, it is automatically registered in the session file when the session is saved.
The Python API documentation for HyperMesh applications.
The application's scripting interface is a set of Tcl/Tk commands that follow a simple and consistent syntax.
Translators are utilities that are run from the command line of the operating system to convert various types of files into different formats.
XML commands in the Result Math Module.
Record playback workflows in the application.
Use the Task Manager to load an XML file that defines tasks and their attributes.
These provide an overview of all additions, updates, and changes to the HyperMesh APIs for each release.
Details on the core data that can be queried and manipulated.
This API allows external applications to link HyperMesh as a library and provides a limited set of functions and structures to access specific functionality.
FE input readers are C programs that read information from ASCII or binary finite element models files into the HyperMesh database.
Details on the HMASCII format and associated commands.
Command files can be used to create new command scripts that perform automation, or to recover previously performed steps.
HyperWorks entities are often used as string parameters in commands that act directly on entities in some fashion, such as creating filtered sets that contain only a specific entity type.
Marks specify groups of entities that are transferred to the command processor. Marks can be created for most entities, and commands are then issued to perform operations on the entities on the mark. HyperMesh allows for two standard marks and a user mark.
At times, it is necessary to define a vector or plane for a command. HyperMesh allocates two vectors and two planes with the IDs 1 and 2. The vectors and planes can be defined at any time during the processing of a command file or Tcl script.
Data names are used to access data from the HyperWorks database. A data name is a string that represents a piece of data. They are basically generic references to the information that physically defines an entity in the HyperWorks environment.
Tcl variables are always strings even when they contain numeric values. For most applications, using strings has no effect, but occasionally a HyperWorks application will expect a real number and passing a string will cause an error.
All variables in Tcl are lists. Lists can contain integers (such as list of node IDs), real numbers (such as coordinates of a node), strings, lists of other lists, or a combination of all the above. A standard variable in Tcl is a list of length 1.
The array is a frequently occurring variable type in programming languages. In Tcl, arrays complement lists by providing additional capabilities when organizing data. Arrays are Tcl variables that have string-based indices (names). Any string value can be used as an array index.
Control structures involve grouping a set of commands into a command body and executing the body either in a loop or based on some condition(s). The body of the structure is grouped with curly braces. This is important as the braces prevent the body from being substituted and evaluated until the proper time.
In Tcl, mathematical expressions are evaluated using the expr command. This command works with integers, floating point values and logical (Boolean) values. There are many arithmetic operators and built-in math functions in Tcl.
Boolean statements allow you to incorporate logic statements into your control structures and mathematical expressions for evaluation.
Braces, quotes, and square brackets control when variables and commands are processed. They are also used to group parameters.
The # character is used to skip lines and insert comments. This can be used both from within tkcon as well as from within a Tcl script.
Procedures organize a repetitive group of commands into a logical block and allow for arguments to be parameterized. They improve performance and memory because a procedure’s commands and variables only exist within the scope of the procedure.
Namespaces provide a means of organizing procedures and variables in Tcl.
Since Tcl/Tk scripts run on a variety of platforms, and there are so many use cases for accessing files, Tcl provides many commands for file manipulation.
The task of extracting and manipulating information via a scripting language is often described using the term string manipulation. Strings are a set of alphanumeric characters stored and manipulated together. These sets are concatenated, truncated, or partitioned by the script with a specific end in mind.
There are Tk commands that bring up the standard Windows style file browsers for selecting directories and files to open or save.
The functionality of the HyperMesh Tcl Modify Command commands are available through Tcl. Additionally, commands that allow you to extract information from the HyperWorks database, such as entity ID numbers on a mark, a list of assemblies, component names, elements per component, nodes per element, node values, and so forth. These are known as HyperMesh Tcl Query Command commands. They are used to query information from the database or template system.
Tcl/Tk scripts can be run in several ways.
Solver templates are ASCII data files containing HyperMesh Template Language Commands and HyperMesh Template Language Functions.
The Script and Model Library is a database of freely accessible scripts and models posted by users and Altair engineers.
View All Altair HyperWorks Help