2024 API Programmer's Guide

Python API

The HyperMesh 2024 release introduces new Python API which allows you to automate your HyperMesh workflows using the Python language. Python scripts can be executed via File > Load > Python Script or they can be linked to custom ribbon or toolbar actions exposed as part of an extension. Python API also forms the basis of the business logic behind custom tasks in Task Manager – the platform for process automation.

Python API exposes the same set of functionalities that are available through Tcl API. More information on the exact Python API coverage (list of supported functions) and the usage can be found in the HyperMesh Python API User Guide.

New Commands

Modified Commands

The following commands have modified behavior that potentially require script updates:
  • Connectors
  • General/Core
    • *copytoclipboard - Removed holderrule option value CONNECTORGROUP.
    • hm_info - Removed value hm_mac from -appinfo SPECIFIEDPATH.
  • Geometry
    • *create_tube_midline - Added new optional arguments dest_part and dest_comp_prefix. Removed dest_comp values Midmesh and Midmesh.#.
    • *midsurface_extract_10 - Added new valid values 3, 6, 7, 16, 17, and 20 and removed values 0, -1, -2, -3, -4, and -5 for new_or_curr_comp.
  • Meshing
    • *midmesh_extract - Added new options DestinationPart and DestinationComponentPrefix. Removed DestinationComponent values Midmesh and Midmesh.#.
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:
  • Data Names
    • collisions - Added new data name source_type.
    • constrainedrigidbodies - Added new data name secondarysetid and new config value 102.
    • designvars
      • free shape - Added new data names nlayer_value, smooth, smooth_method, smooth_nlayer, and smooth_trans.
    • failures - Added new data name NDIR.
    • loads
      • constraints - Added new data names for LS-DYNA engineering loads tolerance and dyna_boundary_set_option.
    • laminates - Added new data name stackedplyids, stackedsequenceids, and zonessynced.
    • retractors - Added new data names element_pull_in_fraction, element_pull_out_fraction, idnodh, idnodt, locking, locking_sensor, pyro_sensor, pyrotechnic, reel_in_force_limit, reel_in_length, reel_in_rate, rettyp, sets, sets_count, sets_count1, sets1, and spool_effect_outlet.
    • sections - Added new data names joint_effective_rad, link_cv1, and link_cv2.
    • sequences - Added new data names parentid, plyshape, repeats, repeatsoverride, and reversesequence.
    • sets - Added new data name config.
    • structuralproperties - Added new config value 86 and new data names se_hangle_max, se_hangle_min, se_ip_autopos_flag, se_ip_fiz_node, se_ip_fiz_point, se_ip_shot_direction, se_ip_ur_initial_direction, se_ip_ur_offset, se_ip_ur_positioned_flag, se_ur_moveback_achieved, se_vangle_max, and se_vangle_min.
  • General/Core
    • *setoption/hm_getoption - Added new options animation_bounce, animation_framerate, animation_linear_increment, animation_linear_numberofsteps, animation_modal_endframe, animation_modal_increment, animation_modal_startframe, animation_mode, animation_transient_endframe, animation_transient_endtime, animation_transient_increment_frame, animation_transient_increment_time, animation_transient_startframe, animation_transient_starttime, and g_ce_org_option. Removed options g_ce_autocreate_parts, g_ce_elem_org_comp_id, and g_ce_elem_org_option.
  • Meshing

Deprecated Commands

  • Connectors
    • hm_ce_getcesnotorganizedinconnectorgroups
    • hm_runcommandfile
    • *CE_ConnectorGroupCreateAndOrganizeConnectors
    • *CE_ReviewConnectorCollectors
  • General/Core

Removed Commands

The following commands/options have been removed and are no longer available for use in scripts:
  • Data Names
    • connectorgroups
  • General/Core
    • hm_getbackgroundgradient
    • *setbackgroundgradient
  • HMASCII
    • *connectorgroups()
  • Post-processing
    • *legendcoloredit
    • *legendcolorsmooth
    • *legenddisplay
    • *legendlocate
    • *legendmove
    • *legendon
    • *legendsavecolors
    • *legendsetbordercolor
    • *legendsetcolor
    • *legendsetcolors
    • *legendsetfont
    • *legendsetlocate
  • Template Commands
    • *connectorgroups()
  • Utility Menu
    • *beginmacro()
    • *callmacro()
    • *createbutton()
    • *createbuttongroup()
    • *createentitypanel()
    • *createlistpanel()
    • *createmarklast()
    • *createmarkpanel()
    • *createtext()
    • *endmacro()
    • *includemacrofile()
    • *nextmacrofile()
    • *prevmacrofile()
    • *pushmacrofile()
    • *setactivegroup()
    • *setactivepage()
    • *setbuttongroupactivecolor()