14.0 API Programmer's Guide

Blocks to Sets and Boxes

The Radioss keywords /GRBEAM/BOX/, /GRBEAM/BOX/, /GRBRIC/BOX/, /GRNOD/BOX/, /GRQUAD/BOX/, /GRSH3N/BOX/, /GRSHEL/BOX/, /GRSPRI/BOX/, /GRTRUS/BOX/, /LINE/BOX/ and /SURF/BOX/ (including /BOX2 keywords) have been mapped from the block entity to the set and new boxes entities. Other keywords of this family are mapped to sets. See Sets and Boxes data names documentation for more details.

Scripts that created or queried the block entity for these keywords must be updated to use the sets and boxes entities. To create one of these keywords, both a set and a box entity are required. The set then refers to the box entity. Below are a few examples.

To create a /GRSHELL/BOX keyword, first create a box entity with config 2 (rectangular box), and then a set with the GRSHELL card image referencing the box entity:
*createentity boxes config=2
*createentity sets cardimage=GRSHELL
*setvalue sets id=$set_id ids={boxes $box_id}
If this is to be a /GRSHELL/BOX2 then additionally set attribute 900 to 1 like below:
*setvalue sets id=$set_id STATUS=2 900=1
Similarly, for creating a rigid link, rigid body, admas, and so on, boxes can also now directly be used:
*createmark boxes 1 "by id only" $box_id
*rigidlinkbycollector $mainNode boxes 1 123456

command.tcl

HyperMesh no longer writes out command.cmf, which utilized the legacy command file syntax. Instead, it now writes command.tcl using standard Tcl syntax. The contents of this file are the same as before. Only the syntax has changed.

In addition, a few new APIs and behaviors have been introduced.
  • Added a new command line option -nowriteviewcommands and Tcl command hm_writeviewcommands to disable writing of certain view commands to the command file. Also added a new hm_info option writeviewcommands to query the value. The list of view commands affected by this is:
    • *rotateabout
    • *view
    • *view_restoreprevious
    • *viewset
    • *window
  • Added a new environment variable HM_COMMANDFILE_DIR to control where the command file is read/written. A value of ./ replicates the current behavior of the start-in directory. Other values indicate an explicit directory.
  • Added a new environment variable HM_COMMANDFILE_MODE to control the behavior of the command file. A value of APPEND replicates the current behavior of appending to any existing file. OVERWRITE deletes any existing file and creates a new one. UNIQUE creates a uniquely named command file per-session.
  • Added a new command, hm_getcommandfile that returns the path and file name of the current command file.

Current Collectors

In order to properly support the modules/parts modular workflow, it is required that when importing any file (CAD, FE, HM binary, etc.) the current collectors are not changed. This applies to components, includes, load collectors, modules/parts, system collectors, and vector collectors. There was an inconsistency in previous releases where sometimes this would be changed on import. Now, the current collector will never be changed during the import of any file. It may be necessary to review and update any scripts that expect this behavior.

Groups to Constrained Extra Nodes

The LS-DYNA keywords *CONSTRAINED_EXTRA_NODES_NODE and *CONSTRAINED_EXTRA_NODES_SET have been mapped from the group entity to the newly added constrainedextranodes entity. See the constrainedextranodes data names documentation for more details.

Scripts that created or queried the group entity for these keywords must be updated to use the constrainedextranodes entity. Below are a few examples.

To create a *CONSTRAINED_EXTRA_NODES_NODE keyword, assign a rigid part ID, and a node ID:
*createentity constrainedextranodes config=101 compid=$comp_id entityid={nodes $node_id}
To create a *CONSTRAINED_EXTRA_NODES_SET keyword, assign a rigid part ID, and a set ID:
*createentity constrainedextranodes config=102 compid=$comp_id entityid={sets $set_id}

Groups to Cross Sections

The LS-DYNA keywords *DATABASE_CROSS_SECTION_PLANE_ID and *DATABASE_CROSS_SECTION_SET_ID, the Radioss keyword /SECT have been mapped from the group entity to the newly added crosssections entity. See the crosssections data names documentation for more details.

The Radioss keywords /SECT/CIRCLE and /SECT/PARAL, and the OptiStruct keyword SECTION are newly supported with the crosssection entity.

Scripts that created or queried the group entity for these keywords must be updated to use the crosssections entity. Below are a few examples.

To create a *DATABASE_CROSS_SECTION_PLANE_ID keyword:
*createentity crosssections config=101
To create a *DATABASE_CROSS_SECTION_SET_ID keyword:
*createentity crosssections config=102
To create a /SECT/, /SECT/CIRCLE or /SECT/PARAL keyword:
*createentity crosssections config=201
To create a SECTION keyword:
*createentity crosssections config=301

History Undo/Redo

Support for multi-level undo/redo has been added for many panels in 14.0.

However, undo/redo support is disabled in 14.0 when running via Tcl. Any commands that modify the database and are run via Tcl will automatically clear the history. This includes Tcl scripts, the command window, etc. However, in order to maintain legacy behavior, there is still one level of undo supported via the *rejectmark command for relevant commands run via Tcl. There are a few caveats to be aware of:
  • *rejectmark will reject multiple steps in the history, if any exist, and is no longer limited to just the last action. So it is important to keep this in mind and update any scripts to not call this command unnecessarily.
  • If history is turned off, *rejectmark is only supported for certain commands that still use the legacy reject mechanism. It will not work for commands that use the new undo/redo mechanism. The solution is to enable history again, for a minimum of 1 action.

There are a number of new commands added to support undo/redo, as listed in the New Commands section.

While these commands are of limited use for 14.0, it is important to understand them as they will become important once undo/redo is supported also for running via Tcl. In addition, code updates can begin happening now for updating Tcl scripts to best support undo/redo. There are several commands of importance.

These provide information on the commands that are enabled for undo/redo support. Additional commands will be supported in future releases.

There are a few commands which are generally supported for history undo/redo, except when the entity_type argument is set as the new "module" entity. When these commands operate on modules, the history will be cleared. These commands are:
These define the start and end of a block of commands that should be considered a single history action, regardless of what commands are run in between. As long as those commands are supported, the entire block of operations is treated as a single undo/redo action. For example:
*startnotehistorystate "Multi operation history action"
*createmark elems 1 1-100
*deletemark elems 1
*createmark elems 1 101-110
*maskentitymark elements 1 0
*endnotehistorystate "Multi operation history action"
This will show as a single undo/redo action with the name "Multi operation history action".

Any calls to *rejectclear clear the entire history. It is therefore important to remove such calls unless they are absolutely necessary.

You can begin to update your Tcl scripts with these in mind, even though they will not have any effect in 14.0.

Modules/Parts

For the 14.0 release, there are only a limited set of APIs available for creating, modifying and querying modules/parts. You will notice that when certain operations are performed (for example, import BOM, add/modify representations, and so on), nothing is written to the command file. This is intentional for the 14.0 release. A complete set of APIs, including full documentation, will be available in 14.0.110.

Parasolid Import/Export

In HyperMesh 2024, all Parasolid import and export now utilizes the native Parasolid libraries. There is no longer support available for using the third-party Parasolid import or export capabilities.

Because of this change, existing command files and Tcl scripts should be updated. The following changes should be made:
  • #ct\parasolid_reader -> #parasolid\parasolid_reader
  • #ct\parasolid_writer -> #parasolid\parasolid_writer
For example, *feinputwithdata2 #ct\parasolid_reader... should be modified to *feinputwithdata2 #parasolid\parasolid_reader. If existing Tcl scripts or command files are run that reference the old reader or writer, the following will occur:
  • The native Parasolid reader or writer will automatically be used.
  • The command file will contain the updated syntax. Scripts should be modified using this modified output.

This is to allow for compatibility with older scripts. While this compatibility is maintained for the 14.0 release, it may be removed in a future release. Therefore, it is recommended to modify scripts to use the native Parasolid reader and writer names during this limited transition period.

Undefined Entities

In HyperMesh 2024, the import and export of referenced entities is fully supported for properties and materials. Undefined entities exhibit the same behaviors as defined entities; they are visible in all relevant browsers and in the . The defined state simply controls the export of the entity.
  • If Defined is inactive, the entity not will be written to the solver deck.
  • If Defined is active, the entity will be written to the solver deck.

The export status of undefined entities cannot be changed.

If a solver deck contains undefined properties or materials, HyperMesh creates the appropriate entities and assigns a default card image upon import. The Defined state, attributes, and card image can be modified as per requirements of the user.

This new behavior may require some logic changes in Tcl scripts. Some legacy scripts may attempt to:
  • Query the materialid or propertyid data names, and then use hm_entityinfo exist to check if that particular entity exists.
  • Compare the materialid or propertyid data names to the material.id or property.id data names to check for entity existence.

As undefined entities are actual entities in the database, this logic will no longer work as both cases will report that the actual entity exists. Depending on the use case, you may need to additionally check if the entity is defined or not. This can be done by using hm_getvalue to query the definedentity data name.

For example, to check if material with ID 100 is undefined:
hm_getvalue mats id=100 dataname=definedentity

New Commands

Modified Commands

The following commands have modified behavior that potentially require script updates:
  • General/Core
    • hm_getentityinfo - Modified the supported syntax for querying specific data names.
The following commands have new options or enhanced capabilities. Existing scripts are not affected and only need to be updated if usage of the new functionality is desired:
  • Collision
    • hm_collisioninit - The first argument now specifies a config value that determines the behavior of the collision detection. All legacy options are supported as-is from previous releases.
    • hm_collisionwriteresultsfile - Enhanced the include_ignored option to allow for appending to results to an existing file, instead of overwriting.
  • Data Names
    • global - Added new data name modelname.
    • nodes - The data name coordinates is now valid for *createentity and *setvalue. It takes as input all 3 coordinates. For example, *createentity nodes coordinates="100.0 200.0 300.0".
    • materials/properties - Added new data name definedentity.
  • General/Core
    • hm_getentityinfo - Added the ability to query data for specific entity configs.
    • hm_getmemoryinfo - Now also supported on Linux.
    • hm_info - Added new options rotationcenteroffscreen and writeviewcommands.
    • hm_collectordisplayed/hm_entitylist/hm_getentitytype/hm_getincrementalname/hm_info - Now consider tags as named entities.
    • hm_nodelist - Added new option index for querying nodes of specific 2D edges or 3D faces. Added new option order for querying all, corner or midside nodes.
    • hm_wadlinessetentities - Added support for running a front bumper only analysis, or providing all of the inputs in a single mark.
    • *appendmark/hm_appendmark - Added new option by face across t junctions.
    • *createentitysameas - The new entity is now properly placed into the same include, module and assemblies as the source entity.
    • *createmark/*appendmark/hm_createmark/hm_appendmark - Added new options: by all nodes, by box entity, by box entity id, by box entity name, by module, by module id and by module name. The by elem option has been enhanced to properly return all nodes for rigids with > 10k nodes.
    • *createmarkpanel/*editmarkpanel - Added new optional argument face_edge_mode to allow for specifying the face/edge selection method to use by default.
    • *findmark - Added new bit value for excluding group elements when finding elements.
  • Geometry
  • Graphics/Visualization
    • hm_info - Added new options automeshcolormode, meshlinecolor, meshlodthreshold, meshtransparency, scalecolor, scaleheight, scaleposition, scalewidth and transparentwithmeshlines.
    • *setelementcolormode - Added new mode 16 for "by part".
    • *settopologydisplaymode - Added new mode 8 for "by part".
  • Meshing

Deprecated Commands

  • General/Core
  • Geometry
  • Meshing
  • Morphing
  • Safety
    • hm_orientseatbelt - No new command recommended.
    • *create2dseatbelt - Use *createseatbelt instead.
    • *create2dseatbeltwithmeshelementsize - Use *createseatbelt instead.
    • *create_sbelt - Use *createseatbelt instead.
    • *create_sbelt2D - Use *createseatbelt instead.
    • *createseatbeltline - Use *createseatbelt instead.
    • *createseatbeltsurfaceandlines - Use *createseatbelt instead.