2023 API Programmer's Guide

Panel Removal

The HyperMesh panels have been completely removed in version 2023. The list of removed panels and their new equivalent workflows can be found on the Tool Finder page. All API commands and command options related to panels have been removed and are listed in the section below.

Existing scripts that are using the panel commands will have to be updated and the operations performed on the panels will have to be replaced by context APIs to work with the corresponding contexts.

Commands triggering an interactive user selection or input panel have been redirected to invoke the appropriate widget and remain supported:

Changes to hm_framework Command

The hm_framework command options addpanel and drawpanel have been deprecated. They remain working until removed, but please note that the usage requirements in New HyperMesh are different to Classic HyperMesh. Existing script might need to be updated to continue working in the new interface.

In Classic HyperMesh, the Tk frame displayed via addpanel and drawpanel could have been fully populated before running the hm_framework command:
set f .test
frame $f

set top [frame $f.top];
pack $top -side top;
set bottom [frame $f.bottom];
pack $bottom -side bottom -fill x -expand 0;

label $top.label -text "Label test";
pack $top.label

hm_framework addpanel $f "Model Info";
hm_framework drawpanel $f;
In New HyperMesh, the Tk frame must be empty when supplied to the hm_framework command and populated afterwards. Otherwise, a pop-up message is returned informing you that an empty frame must be supplied to the hm_framework command. The code below is supported in both interfaces.
set f .test
frame $f

hm_framework addpanel $f "Model Info";
hm_framework drawpanel $f;

set top [frame $f.top];
pack $top -side top;
set bottom [frame $f.bottom];
pack $bottom -side bottom -fill x -expand 0;

label $top.label -text "Label test";
pack $top.label

Script Parser

The Script Parser is a Tcl-based utility allowing you to scan your Tcl scripts and identify the API commands present in the code. The output can be interactively reviewed in the Script Parser GUI or exported as a CSV report. The provided information includes the details about which file and in which line a particular command can be found. In case Script Parser identifies a deprecated command, it will also show you the new command to use instead if there is a new equivalent.

The Script Parser can be launched by sourcing the main.tcl file located in <installation_directory>/hwdesktop/utility/scriptparser. More information can be found in the documented located in <installation_directory>/hwdesktop/utility/scriptparser/help.

Properties to MaterialBehaviors

The PAM-CRASH keyword RUPMO and NLAVE has been mapped from the property entity to the materialbehaviors entity. See the materialbehaviors data names documentation for more details.

Scripts that created or queried the property entity for these keywords must be updated to use the materialbehaviors entity.

To create a RUPMO keyword, create a materialbehaviors entity with config 401:
*createentity materialbehaviors config=401
To create a NLAVE keyword, create a materialbehaviors entity with config 401 and type 2:
*createentity materialbehaviors config=401 type=2
To set the value of the frict1 field on a FRICT card:
*setvalue materialbehaviors id=1 STATUS=1 failt=110.5
To query the value of the frict1 field on a FRICT card:
hm_getvalue materialbehaviors id=1 dataname=failt

New Commands

Modified Commands

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:
  • Composites
    • *plydrape - Removed options for application value LaminateTool. Added options for application value kinematic_draping.
  • Data Names
    • constraints - Added new config values 103, 104. Added new data names: D, DN, DNID, DT, EXPN, EXPT, FN, FN_Flag, FNMID, FT, NID1, NID2, LPID, PIDVB, UPID, XIN, XIT, XPID1, XPID2, XPID3, and XPID4.
    • failures - Added new config value 238. 239, and 240. Added new data names alpha_param, c1_constant, c2_constant, c3_constant, c4_constant, c5_constant, c6_constant, comptyp, damage_init_flag, damage_init_max, disp, dsf, ecrit, el_ref_scale, elscal, ener, epf_biax, epf_comp, epf_min, epf_plane, epf_shear, epf_tens, epsf_id, evoshap, evotype, exp, exp_ref, failip, fcrit, fct_dlim, fct_exp, fct_sr, fscale_dlim, fscale_sr, icard, ilen, initype, inst_id, ireg, ishear, n_value, necking_iform, necking_inst, ninievo, param, pthickfail_layers, soft_exp, sr_ref, sr_ref1, sr_ref2, tab_el, tab_el_scale, and tab_ID.
    • freebodysections - Added new config values 1, 2, 3 and new data names base, corner1, corner2, corner3, corner4, intersectentitytype, intersectids, nodeDetectionType, normal, orientation, planelength, planebreadth, resolve, support, thickness and weights.
    • legends - Added new data names legend_max_level_values and legend_min_level_values.
    • materialbehaviors - Added new config values 401. Added new data names a1, a2, a3, a4, afailb, afailn, afails, afailt, alpha, ascalf, beta, d1, d2, dc, dmgelim, enercrid, entities, epsin, faild, failt, filter, ifmon, ifrcdir, intf1, intf2, irupopt, lcscale, numdata, plim, plugname, qualifier, qualifier1, radiusave, rc, scalrad, timcent, timeelim, timfail, type, usr1, usr2, usr3, usr4, usr5, usr6, usr7, usr8, usr9, usr10, usr11, usr12, usr13, usr14, usr15, usr16, usr17, usr18, usr19, usr20, usr21, usr22, usr23, usr24, usr25, usr26, usr27, usr28, usr29, usr30, usr31, and usr32.
    • nodes - Added new data names initialcoords and thickness.
    • plotcontrols - Added new config value 7 and new data names applied, arrowlength, categoryforce, categorymoment, categoryoptions, categorysectiontype, categorysystemtype, decimallimit, fbdids, forcedisplay, forcenormal, forcetangent, forcex, forcexyz, forcey, forcez, internal, legend_visibility, momentdisplay, momentnormal, momenttangent, momentx, momentxyz, momenty, mpc, resolveintype, scale, sectiondatatype, sectiontype, showvalues, spc, Style, and systemids, tensor_data_components and vector_data_components.
    • solvermasses - Added new config values 301-305. Added new data names listofmasses, nsge_end_id, nsge_list_or_range, nsge_start_id, nsgeadd_entity_list, nsgeadd_num, nsm_all, nsm_all_option, nsm_cardlist, nsm_definition, nsm_ids, nsm_num, nsm_proptype, nsmadd_entity_list, and nsmadd_num.
    • subsystems - Added new data names subsystems_triple_dxyz1, subsystems_triple_dxyz2, subsystems_triple_dxyz3, subsystems_triple_xyz0, and transformation_matrix.
    • transformations - Added new config value 201. Added following new data names position_point1, position_point2, position_point3, position_point4, position_point5, position_point6, position_point1_x, position_point1_y, position_point1_z, position_point2_x, position_point2_y, position_point2_z, position_point3_x, position_point3_y, position_point3_z, position_point4_x, position_point4_y, position_point4_z, position_point5_x, position_point5_y, position_point5_z, position_point6_x, position_point6_y, and position_point6_z.
  • Geometry
  • General/Core
    • *findedges - Updated the syntax to support name-value argument pairs and added new options edgetype, createlines, smoothlines, breakangle, ignorefeatures, componentname, componentprefix, and chainid.
    • *findfaces - Added new options componentname, componentprefix, and cluster_index.
    • *modelcheck_runchecks - Added new value “DISPLAYED” for entity_type.
    • *setoption/hm_getoption - Added new options blue_auto_color_range_max, blue_auto_color_range_min, display_associated_geometry_fe, g_ce_boltcylinderdisplaystatus, g_ce_boltcylinderdisplaytransparency, g_ce_colorby, g_ce_Cwelddisplaystatus, g_ce_size, g_ce_weld_database_file_path, green_auto_color_range_max, green_auto_color_range_min, red_auto_color_range_max, and red_auto_color_range_min.
  • Meshing
    • *element_smooth_nodes - Renamed the anchornodes option to anchorfreeedgenodes.
    • *elementqualitycollapseedge - Updated the syntax to support name-value argument pairs and added new option optimize.
    • *elementqualitysplitedge - Updated the syntax to support name-value argument pairs and added new option optimize.
    • *imprint_geom - Added new options projection, to_dest_component, do_not_remesh_rebuild_extn, do_not_add_fixed_points_edges, and anchor_nodes_mark. Added new remain value 4.
    • *markcombineelements - Updated the syntax to support name-value argument pairs and added new option validity.
    • *normalsadjust2 - Added support for FE surfaces and deprecated arguments size and display.
    • *remesh_optistruct - Removed the options skipgs and skiges.
    • *splitelementbyelemselect - Added new options dividequadsoptions, midpointoptions, reverseorientation, splitallsidesoptions, splitnumberedges, splitoptions, useinferredgeometry and useadjacentlayer.
  • Skeleton
    • *absorbmember - Added new options along_line, auto_detect_thin_solids, autoweld, create_member_sections, create_sketch, elemconfig, elemdensity , elemsize, elemtype, planelength, planewidth, realize, sectiontype, useelemdensity, and vertex_angle.

Deprecated Commands

  • General/Core
  • GUI
    • hm_createmacromenu
    • hm_framework - Deprecated options addpanel, drawpanel, getrecentfiles, and getrecentimports.
    • hm_highlightmark - Deprecated argument panel_sensitive.
    • hm_winfo - Deprecated option utilitywindow.
  • Utility Menu
    • *beginmacro()
    • *callmacro()
    • *createbutton()
    • *createbuttongroup()
    • *createentitypanel()
    • *createlistpanel()
    • *createmarklast()
    • *createmarkpanel()
    • *createtext()
    • *endmacro()
    • *includemacrofile()
    • *nextmacrofile()
    • *prevmacrofile()
    • *pushmacrofile()
    • *setactivegroup()
    • *setactivepage()
    • *setbuttongroupactivecolor()

Removed Commands

The following commands/options have been removed and are no longer available for use in scripts:
  • General/Core
    • *settopologyedgedisplay - Use *setoption topology_edge_display_mode instead.
    • hm_get2delemchecktestval
    • hm_info - Removed options analysisfileset, commandfilename, exportfilename, exporttemplate, importfilename, importtranslator, plottingdisplay, and resultfileset.
    • *screendump
    • *setoption/hm_getoption - Removed options background_colors-1, background_colors-2, edge_density_visible, and hide_panels_automatically.
  • GUI/Framework
    • hm_centerview
    • hm_clearmenuerror
    • hm_framework - Removed options addrecentfile, addrecentimport, getmenustatus, getpulldowns, getregisteredprocs after_menudraw, getregisteredprocs before_menudraw, getregisteredprocs erase_userpanel, popgui, pushgui, registerproc after_menudraw, registerproc before_menudraw, registerproc erase_userpanel, removelabelsfrompulldowns, removerecentfile, removerecentimport, resetpulldowns, resizetab, setcmdstatus, setguigeom, setnativeheight, unregisterproc after_menudraw, unregisterproc before_menudraw, and unregisterproc erase_userpanel.
    • hm_getitemnumberbytag
    • hm_rotateview
    • hm_scaleview
    • hm_togglevirtualcollector
    • hm_winfo - Removed options hasfocus, isobscured, menucharheight, and menulines.
    • hm_wm - Removed options menufont and pulldowns.
  • Manufacturing
    • *hf_CheckDieModuleElementsRES
  • Panel
    • hm_activateitem
    • hm_callcardpanel
    • hm_calldisplaypanel
    • hm_callglobalpanel
    • hm_calloptionspanel
    • hm_callpanel
    • hm_callplotwindowpanel
    • hm_callspecialpanel
    • hm_calltrueviewpanel
    • hm_callviewpanel
    • hm_callvispanel
    • hm_callwhatsnew
    • hm_completemenuoperation
    • hm_createbitmap
    • hm_createbuttononpanel
    • hm_disablecollector
    • hm_disableitem
    • hm_disablemenudrawing
    • hm_disablepopup
    • hm_displaynumbers
    • hm_dumppanel
    • hm_enableitem
    • hm_enablemenudrawing
    • hm_enablepopup
    • hm_exitpanel
    • hm_getcolnumber
    • hm_getcommandposition
    • hm_getcurrentmenu
    • hm_getfilenamedirect
    • hm_getinputentry
    • hm_getitemnumber
    • hm_getitemnumberbytag
    • hm_getitemowner
    • hm_getitemposition
    • hm_getitemtype
    • hm_getpanelarea
    • hm_getpanelitems
    • hm_getpanelposition
    • hm_getradiobutton
    • hm_gettwoitemtoggle
    • hm_initpanel
    • hm_listpanels
    • hm_menufilter
    • hm_orientseatbelt
    • hm_panelnamevalid
    • hm_pushpanel
    • hm_pushpanelitem
    • hm_renameitem
    • hm_renameitemonpopup
    • hm_renamepanelonpage
    • hm_resetcollectorfilter
    • hm_resizewindow
    • hm_setcardprevreviewproc
    • hm_setcollector
    • hm_setcollectorfilter
    • hm_setcommandposition
    • hm_setcurrentfilename
    • hm_setinputentry
    • hm_setinterfacepanelproc
    • hm_setitemposition
    • hm_setitemvisible
    • hm_setlinemeshpanelproc
    • hm_setmainpanel
    • hm_setpage
    • hm_setpanelheight
    • hm_setpanelname
    • hm_setpanelonpage
    • hm_setpanelposition
    • hm_setpopup
    • hm_setradiobutton
    • hm_setrigidwallpanelproc
    • hm_setstaritem
    • hm_setsystempanelproc
    • hm_settkpaneltitle
    • hm_settwoitemtoggle
    • hm_setuserprofileoption
    • hm_tkpanel
    • hm_togglemenu
    • hm_updatemenu
    • hm_userpanelonpage
    • *setmenustate
  • Post-processing
    • *animatelinear
    • *animatemodal
    • *animatetransient
  • Utility Menu
    • *enterpanel()