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.
*createentity boxes config=2
*createentity sets cardimage=GRSHELL
*setvalue sets id=$set_id ids={boxes $box_id}
*setvalue sets id=$set_id STATUS=2 900=1
*createmark boxes 1 "by id only" $box_id
*rigidlinkbycollector $mainNode boxes 1 123456
command.tcl
HyperWorks Desktop 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.
- 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.
*createentity constrainedextranodes config=101 compid=$comp_id entityid={nodes $node_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.
*createentity crosssections config=101
*createentity crosssections config=102
*createentity crosssections config=201
*createentity crosssections config=301
History Undo/Redo
Support for multi-level undo/redo has been added for many panels in 14.0.
- *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.
These provide information on the commands that are enabled for undo/redo support. Additional commands will be supported in future releases.
*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 HyperWorks Desktop 2022.2, 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.
- #ct\parasolid_reader -> #parasolid\parasolid_reader
- #ct\parasolid_writer -> #parasolid\parasolid_writer
- 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
- 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, HyperWorks Desktop 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.
- 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.
hm_getvalue mats id=100 dataname=definedentity
New Commands
- Collision
- Connectors
- Data Names
- Ext API Functions
- General/Core
- hm_findconnectedpatches
- hm_findprojected
- hm_getcommandfile
- hm_getdeleteassociatedentitiesbycompmark
- hm_getelementnormal
- hm_getentityalias
- hm_getexistingentitytypes
- hm_gethmfileuserprofile
- hm_getincludeentities
- hm_getmodelcheckconcernentityidresultentityid
- hm_getoccupiedentitiesinrange
- hm_gettiedentities
- hm_gettypeswithunresolvedids
- hm_getunresolvedidcrossreferences
- hm_getunresolvedids
- hm_getunusedoremptyentities
- hm_holedetectionend
- hm_holedetectionfindholes
- hm_holedetectionfindmates
- hm_holedetectiongetholedetails
- hm_holedetectiongetmatedetails
- hm_holedetectiongetnumberofholes
- hm_holedetectiongetnumberofmates
- hm_holedetectioninit
- hm_holedetectionsetentities
- hm_holedetectionsetholeparams
- hm_holedetectionsettubeparams
- hm_isentitydatanameparameterized
- hm_isentitysupportedforaction
- hm_wadlinesgetgridpointsleg
- hm_wadlinesgetinternalbumperline
- hm_wadlinesgetleggridline
- hm_wadlinesgetsectionmax
- hm_wadlinessetbumper
- hm_writeviewcommands
- *addiconnectivity
- *assignsystemfromcurves
- *clearunusedunresolvedids
- *duplicateentities
- *end_batch_import
- *equationupdatemeshconnectivity
- *filewriteentities
- *icelementcreate
- *mapgroupelementsfromshellstosolids
- *maskall2
- *masknotshown2
- *maskreverseall2
- *mergefile2
- *modifyicelement
- *pressuresonentity_curve
- *realizeentity
- *removeassembly
- *removeelemsfromcontactsurfusingnodes
- *setparameter
- *setparametermark
- *springos
- *springsosupdate
- *start_batch_import
- *unmaskall2
- *unmaskshown2
- *unsetparameter
- *unsetparametermark
- *updateincludedata2
- *writeh3dwithoptions
- Geometry
- hm_getedgeloops
- hm_markbyfeature
- *geomoutputdata2
- *surfacesplineonnodesloop2
- Graphics/Visualization
- GUI
- HMASCII
- Meshing
- hm_getqualitycriteriaelementsizeinfo
- hm_getunoffsetablenodes
- hm_proximityend
- hm_proximitygetcomponentelementpair
- hm_proximitygetcomponentelementpaircount
- hm_proximitygetcomponentpair
- hm_proximitygetcomponentpaircount
- hm_proximityinit
- hm_proximitymarkcomponentallelementpairs
- hm_writemeshcontroltemplate
- *acousticmeshinterface_2
- *adaptive_triangle_mesh
- *adaptive_wrapper_leak_check_mc
- *adaptive_wrapper_mesh_mc
- *adaptive_wrapper_mesh_reject
- *adaptive_wrapper_preview_clear
- *adaptive_wrapper_preview_reject
- *adaptive_wrapper_reject_clear
- *alignnode3
- *automesh_mc
- *batchmesh_mc
- *cleanup_unoffsetable_nodes
- *control_sum_3
- *create_voxel_lattice_mesh
- *detachallelements
- *fill_fe_gaps_elems
- *fill_fe_gaps_nodeid
- *fill_fe_gaps_nodelist
- *fill_fe_holes_nodelist
- *hm_batchmesh2
- *lineeditlength
- *linemesh_savedata1
- *linemesh_savedata_bar1
- *midsurface_imprint
- *normalsadjust2
- *readmeshcontroltemplate
- *refine_adaptive
- *refine_by_patterns
- *refine_by_patterns_multiple_points
- *rejectbatchmesh
- *remove_fe_cracks
- *set_acousticmesh_options
- *setqualitycriteria
- *sl_feature_mesh
- *sl_meshsurfaces
- *surfacereversenormals2
- *trim_shell_elems_by_shell_elems
- Modules/Parts
- Morphing
- Optimization
- *latparmcreate
- *latparmupdate
- *opticontrolupdatebarconparameters
- *optiminmaxupdate
- *optiresponsesetequationdata3
- *topologylatticeupdate
- Safety
- *createseatbelt
- *createseatbeltmesh
- *seatbeltnodecreate
- *updateseatbelt
- Template Commands
- *boxes()
- *constrainedextranodes()
- *crosssections()
- *encryptions()
- *executetclscript()
- *fields()
- *meshcontrols()
- *modules()
- *outputparameterizeddata()
- *parameters()
- *positions()
- *regions()
- *registerparameterizeddataappendstring()
- *registerparameterizeddataendstring()
- *setettypeelemtypereference()
- *sortsets()
- *transformations()
- Template Functions
- Undo/Redo
Modified Commands
- General/Core
- hm_getentityinfo - Modified the supported syntax for querying specific data names.
- 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
- hm_gettgofpointsonline/hm_getlinetgstartpoint/hm_getlinetgendpoint/hm_getlinetangentatcoordinate - The tangent vectors are now returned taking into account the line orientation.
- *midsurface_display_plates - Replaced the previous reserved argument with plate_type.
- *midsurface_extract_10 - Added additional supported values for extract_by_comp to maintain component transparency. Added new supported value to the rerun_type argument to support the new "skin offset" method. Added additional supported values to the new_or_curr_comp argument to allow for immediate sorting during midsurface extraction using negative values.
- *midsurface_remove_display_plates - Replaced the previous reserved1 argument with remove_from_all_comps.
- *sort_midsurfaces - Added new sorting mode 4. Enhanced behavior so when creating new components for sorting, the new components are created a duplicates of the originals, and organized into the same parts, assemblies and includes as the originals.
- *surfmark_trim_by_surfmark - Added new trim mode 2.
- *splinesurface/*surfacesplineonlinesloop/*surfacesplinefrompoints - Added new support to the options argument, for associating/stitching of existing meshes to new geometries/meshes.
- 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
- *adaptive_wrapper_mesh - Added new options AcousticMeshType, AcousticMeshQualityHexJacobian, AcousticMeshQualityTetCollapse, ConsiderCavityByComps, SpanAngle and OrganizeWrapElemsByBaseComps.
- *adaptive_wrapper_preview - Added new option num_cavities.
- *compute_midmesh_thickness - Added new option MaxRelativeChordalDeviation.
- *imprint_elements - Added new remesh_mode -1.
- *splitelements - Added new split options.
- *tetmesh - Added meshcontrols support.
Deprecated Commands
- General/Core
- *updateincludedata - Use *updateincludedata2 instead.
- Geometry
- *geomoutputdata - Use *geomoutputdata2 instead.
- *surfacereversenormals - Use *surfacereversenormals2 instead.
- *surfacesplineonnodesloop - Use *surfacesplineonnodesloop2 instead.
- *writeh3d/*writeh3dtofile/*writeh3dwithorienttofile/*writeh3dwithtitlestofile - Use *writeh3dwithoptions.
- Meshing
- *linemesh_savedata - Use *linemesh_savedata1 instead.
- *linemesh_savedata_bar - Use *linemesh_savedata_bar1 instead.
- *normalsadjust - Use *normalsadjust2 instead.
- Morphing
- hm_morph_domaintypecount - Use hm_morph_getinfo instead.
- hm_morph_getcountercurrent - Use hm_morph_getinfo instead.
- hm_morph_getcountermaximum - Use hm_morph_getinfo instead.
- hm_morph_getparameter - Use hm_morph_getinfo instead.
- 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.