9.0 API Programmer's Guide

2D/3D Properties

In HyperMesh 9.0, there is new core functionality for assigning properties directly to 1D, 2D, and 3D elements in addition to the existing method of assigning properties to components. Also, for solver group #1 (OptiStruct, Abaqus, Nastran) components no longer have property cards assigned to them. Instead, users create properties for all element types (1D, 2D, and 3D) the same and assign those properties to either components or elements depending on the behavior desired. The implementation for solver group #1 and solver group #2 (Radioss, ANSYS, LS-DYNA, PAM-CRASH, Permas) is given below.

For solver group #1 (OptiStruct, Abaqus, Nastran) the following diagram and rules apply for property assignment to components and elements:
Figure 1.
  • If property assigned to the element, that element is assigned the element property.
  • If no property is assigned to the element, that element is assigned its component property.
  • If no property is assigned to the element or component, that element is assigned no property.
  • Materials are always assigned to properties and each element is assigned the material of its property.
For solver group #2 (Radioss, ANSYS, LS-DYNA, PAM-CRASH, Permas) the following diagram and rules apply for property assignment to components and elements:
Figure 2.
  • Property and materials are assigned to components only. Ignores any property assigned to elements.
  • All elements within a component are assigned the component property and the component material.

New and Updated Tcl Commands for 2D/3D Properties

  • Elements and components now have data names for referenced properties:
    1. property (pointer)
    2. propertyid
  • To query the property and material assigned to a component or an element for solver group #1:
    1. hm_getentityvalue comps $id property.id 0
    2. hm_getentityvalue elems $id property.id 0
    3. hm_getentityvalue elems $id property.material.id 0
  • To query the property and material assigned to a component or an element for solver group #2:
    1. hm_getentityvalue comps $id material.id 0
    2. hm_getentityvalue comps $id property.id 0
    3. hm_getentityvalue elems $id collector.material.id 0
    4. hm_getentityvalue elems $id collector.property.id 0
      Note: If an element has been assigned a property directly it is still possible to query these values even though the solver group is not using them.
  • *propertyupdate entity_type mark_id property_name
    • This command assigns/updates/unassigns the property associated with components and elements. This same command is used by the assign subpanel in both the comps and properties panels.
  • *createmark/*appendmark/hm_createmark/hm_appendmark
    • These options are available for components and elements:
      • "by property"
      • "by property id"
      • "by property name"
  • *createmark/*appendmark/hm_createmark/hm_appendmark
    • These options are available for components, elements, and properties:
      • "by material"
      • "by material id"
      • "by material name"
  • hm_getthickness entity_type entity_id ?ply_id?\
    • This command returns the thickness associated with the passed components and elements. The optional ply_id argument allows for additional control for querying the thickness of individual plies of composites. The thicknesses returned by this command follow the specific solver interface rules described above.
  • hm_getcompthickness
    • This command will return the same values as in 8.0, the thickness assigned to the property assigned to the component for both solver groups #1 and #2. However, these may not be the expected values as properties for solver group #1 can be assigned to the elements in 9.0. The continuing usage is of this command is not recommended, instead, use the command hm_getthickness with the appropriate options. This command will be deprecated.

Scripting Considerations

  • Card images on components have been moved to properties for solver group #1.

    For example, the OptiStruct PSHELL card image is now a property card image instead of a component card image. Any scripts that create components and assign these card images must now create a property and assign the property to the component or to the elements.

  • Both elements and components can have property references for solver group #1.

    Scripts that either set or query properties (thickness for example) must now consider that elements within the component can also have properties assigned directly to them.

    Properties on components are now core references instead of template attributes for solver group #2. Instead of using the template attributes, scripts must now be updated to use the core data reference. (THIS HAS NOT BEEN COMPLETELY ACHIEVED AS OF YET FOR 9.0 - FOR SOLVER GROUP #2. FOR Radioss, LS-DYNA, PAM-CRASH, PROPERTIES ON COMPONENTS ARE STILL ATTRIBUTES. FOR ALL OTHERS, PROPERTIES ON COMPONENTS ARE CORE ENTITIES.)

  • Scripts using hm_getcompthickness.

    This command is no longer supported and continuing usage is not recommended. Instead, use the command hm_getthickness with the appropriate options.

When converting or switching between solver interfaces it is possible to have some "mixture" between the two methods shown above. It is important to know what the correct practice is for each solver interface in order to know when modifications are required. It is also important to know these practices in order to understand the values being returned from relevant Tcl commands.

Active/Inactive

In HyperMesh 9.0, there is new core functionality for setting collectors and named entities states to "active" or "inactive". See below for a list of collectors and named entities in HyperMesh that have this setting. "Inactive" entities are not shown in panel lists, browsers lists, and are not available for selection through HyperMesh entity selectors and most Tcl commands. An "inactive" entity is essentially "locked" in the database. See the HyperMesh User's Guide for additional details.

Collectors with Active/Inactive state:
  • Include
  • Assembly
  • Component
  • Load Collector
  • System Collector
  • Vector Collector
  • BeamSection Collector
  • Multibody
Named entities with Active/Inactive state:
  • Property
  • Material
  • Sets
  • LoadSteps
  • OutputBlocks
  • Blocks
  • Tabs
  • Titles
  • Plots
  • ContactSurfaces
  • Groups
  • Sensors
  • Control Volumes
  • Cards
  • Optimization
The active/inactive state of collected entities (example elements, loads, systems, etc.) are controlled by their collector active/inactive state. Below is a list of collected entities and their collector:
  • Nodes - Special entity, See the HyperMesh User's Guide for additional details.
  • Element - Component
  • Connector - Component
  • Load - Load Collector
  • Equation - Load Collector
  • System - System Collector
  • Vector - Vector Collector
  • Point - Component
  • Line - Component
  • Surface - Component
  • Solid - Component
  • BeamSection - BeamSection Collector
  • Ellipsoids - Multibody
  • MBPlanes - Multibody
  • MBJoints - Multibody

As a final note, all morphing entities do not utilize active/inactive states.

New/Updated Tcl Commands for Active/Inactive

  • Entities with an active/inactive state now have a new data name.
    • activesuppressed (0 indicates active, non-zero indicates inactive)
    • To query the active state of one of these entities using the entity ID:
    • hm_getentityvalue $entity_type $entity_id activesuppressed 0 -byid
  • *allsuppressactive, *entitysuppressactive, *includesuppressactive, *marksuppressactive
    • These commands have been created in order to set the active/inactive state for specific entities or marks.
  • *createmark/*appendmark/hm_createmark/hm_appendmark
    • These commands will only select/return entities from the database that have an active state. If an entity is set to inactive, or its parent collector is set to inactive for collected entities, then the entity will not be selected/returned. Inactive entities can only be selected using the following options to these commands:
      • "inactive"
      • "by id only"
      • "by name only"
      • no option, directly enter names or IDs
    • Furthermore, if an inactive entity is used as one of the selection options, no entities will be returned based on that entity. For example, if an entity set is marked inactive and elements are selected "by set", even though those elements may be active, because the set is inactive no elements from that set will be returned.
  • hm_entitylist
    • This command will only return entities from the database that have an active state. If an entity is set to inactive, or its parent collector is set to inactive for collected entities, then the entity will not be returned.
  • *findmark
    • This command finds both active and inactive entities. If it finds an inactive entity, it also makes the entity active.
  • *renumberall, *renumbersolverid, *renamecollectorbyid
    • These commands will only consider active entities. (This has not yet been completely achieved).

Scripting Considerations

  • Current append mark, create mark, and hm_entitylist commands may not return all of the expected entities.
    • If you have not set any entity to inactive in the database, all commands return/behave as 8.0 and earlier. Scripters only need to consider updates/enhancements to their scripts if they want to utilize the active/inactive functionality or their users will use the active/inactive functionality. It is possible that the user has set some entities inactive in the database. If a Tcl script is expecting these entities to be returned, for example using *createmark all (which only returns all active entities in 9.0), the script may need to be updated to also select the inactive entities (*createmark inactive). Another alternative is to make the parent collector active before selecting (*entitysuppressactive, *marksuppressactive). Then *createmark all will return all as 8.0 and earlier. It is only necessary to update scripts if users use active/inactive. No changes are required if all entities in the database are active. A failsafe command has been created for scripters who do not wish to update their scripts to handle active/inactive for 9.0. The command *allsuppressactive can be run at the beginning of a script to make all entities active so that the script performs as expected with a minimal amount of updating.
  • Commands can still operate on inactive entities.
    • Although entities may be marked "inactive", commands can still operate them if they are passed to the command. For example, if a mark of inactive components is created using *createmark inactive, that mark can be passed to the *deletemark command and those comps can be deleted. The same is true for commands that accept individual entity names/IDs. This is only possible via the Tcl/Tk command layer. A user cannot do this through the HyperMesh GUI interactively in HyperMesh. It is a special consideration/behavior for HyperMesh Tcl/Tk scripters to understand and manage appropriately, at least for 9.0.

Custom Export

In HyperMesh 9.0, there is new core functionality for setting collectors and named entities states to "export" or "do not export". See below for a list of collectors and named entities in HyperMesh that have this setting. Setting an entities export state allows the new "custom" export option to determine if that entity should be exported or not exported. The standard export options "all" and "displayed" ignore the export state of the entity and behave exactly as they did in 8.0. See the HyperMesh User's Guide for additional details.

Collectors with Export state:
  • Include
  • Assembly
  • Component
  • Load Collector
  • System Collector
  • Vector Collector
  • BeamSection Collector
  • Multibody
Named entities with Export state:
  • Property
  • Material
  • Sets
  • LoadSteps
  • OutputBlocks
  • Blocks
  • Tabs
  • Titles
  • Plots
  • ContactSurfaces
  • Groups
  • Sensors
  • Control Volumes
  • Cards
  • Optimization
The export state of collected entities (example elements, loads, systems, etc.) are controlled by their collectors export state. Below is a list of collected entities and their collector:
  • Nodes - Special entity, See the HyperMesh User's Guide for additional details.
  • Element - Component
  • Connector - Component
  • Load - Load Collector
  • Equation - Load Collector
  • System - System Collector
  • Vector - Vector Collector
  • Point - Component
  • Line - Component
  • Surface - Component
  • Solid - Component
  • BeamSection - BeamSection Collector
  • Ellipsoids - Multibody
  • MBPlanes - Multibody
  • MBJoints - Multibody

As a final note, all morphing entities do not utilize export states.

New/Updated Tcl Commands for Custom Export

  • Entities with an export state now have a new data name.
    • outputsuppressed (0 indicates export, non-zero indicates do not export)
    • To query the export state of one of these entities using the entity ID:
    • hm_getentityvalue $entity_type $entity_id outputsuppressed 0 -byid
  • *allsuppressoutput, *entitysuppressoutput, *includesuppressoutput, *marksuppressoutput
    • These commands have been created in order to set the export/do not export state for specific entities or marks.
  • New option for "all" parameter on *feoutput and *feoutputwithdata commands.
    • The "all" parameter on these commands now has the following values:
      • 0 - Only the visible entities are exported.
      • 1 - All entities are exported.
      • 2 - Only entities with export bit set to 0 are exported. This is also known as custom export.
      • The *feoutputwithdata command is suggested for output as the *feoutput command will be deprecated.

Display Masking

In HyperMesh 9.0, masking commands have been updated to support only the masking of relevant entities. Masking commands no longer operate on the display state of collectors. If a collector entity is passed to a masking command, the collected entities contained in the collector will be masked but the display state of the collector will not be changed. For changing the display state of a collector relevant display commands must be used.

New/Updated Tcl Commands for Display/Masking

  • *maskall, *maskentitiesincollector, *maskentitymark, *masknotshown, *maskreverse, *maskreverseall, *unmaskall, *unmaskentitiesincollector, *unmaskentitymark, *unmaskshown
    • These commands do not operate on the display state of collectors. Instead, they only operate on the mask state of collected entities that are listed below. In order for an entity to be masked/unmasked, its parent collector must have the relevant element/geometry display state turned "on".
    • Collected Entities and their Collectors:
    • Points - Components
    • Lines - Components
    • Surfaces - Components
    • Solids - Components
    • Connectors - Components
    • Elements - Components
    • Loads - Load Collectors
    • Equations - Load Collectors
    • Systems - System Collectors
    • Vectors - Vector Collectors
    • Ellipsoids - Multibodies
    • Mbjoints - Multibodies
    • Mbplanes - Multibodies
    • Tags - No Collector, this is a Named Entity which has mask state
    • Domains - No Collector, this is a Named Entity which has mask state
    • Handles - No Collector, this is a Named Entity which has mask state
    • Symmetries - No Collector, this is a Named Entity which has mask state
    • Morphconstraints - No Collector, this is a Named Entity which has mask state
    • The *maskentitymark, *maskreverse, and *unmaskentitymark commands also support operations on collectors, in which case all collected entities contained within the collectors are masked/unmasked but the display state of the parent collector is not modified.
    • Components (Connectors, Points, Lines, Surfaces, Solids, Elements)
    • Groups (Master/Slave Elements)
    • Load Collectors (Equations, Loads)
    • Multibodies (Ellipsoids, MBjoints, MBbplanes)
    • System Collectors (Systems)
    • Vector Collectors (Vectors)
  • *maskmark

    This command has been updated to perform similarly as the commands above.

    This command is no longer supported and continuing usage is not recommended. Instead, use the command *maskentitymark with the appropriate options.

  • *unmaskmark, *unmaskmarkedelements

    This command has been updated to perform similarly as the commands above.

    This command is no longer supported and continuing usage is not recommended. Instead, use the command *unmaskentitymark with the appropriate options.

Scripting Considerations

  • Scripts using *maskmark, *unmaskmark and *unmaskmarkelements

    Scripts that use any of these commands should be updated to use the new commands as indicated above.

  • Scripts using any masking/unmasking commands.

    Scripts that use any masking/unmasking commands should be checked to make sure that they are not being expected to operate on the display of collectors. Instead, relevant display commands should be used.

Browsers

In HyperMesh 9.0, browsers have taken a more prominent role. There is an overhead associated with updating the browser GUI each time an entity is created, modified or deleted. This can have a negative effect on script performance. In order to remedy this, there is a new command introduced that allows the update of the browser display to be withheld until the operation of the script is completed:
hwbrowsermanager view flush false; // add this at starting of script
...
...
body of script
...
...
hwbrowsermanager view flush true; // add this at end of script

It is important to note that the scripter must make sure to turn the browser flush back on at the end of the script or anytime a script exits or stops.

New Commands

Modified Commands

Deprecated Commands

Removed Commands

  • Geometry
    • hm_lineparameterizationwithbounds
    • hm_smoothenjointswithfillet
    • *find_zero_and_small_area_faces
  • Meshing
    • *full_remesh
    • *opti_defaultmeshsurf
    • *remeshelemsabout
    • *setdoamcleanup
    • *setdoamoptimization
    • *setdoelementcleanup
    • *setdoelementoptimization
    • *setdoelementremesh
    • *setdofirstcleanup
    • *setdofixrededges
    • *setdohmcleanup
    • *setdohmoptimization
    • *setdoinitialmesh
    • *setdomeshinteractively
    • *setdoremovefillets
    • *setdoremovepinholes
    • *setdoselectmeshalgorithm
    • *setdotopologycleanup
    • *surfacemarkcombine_variabletolerance
    • *try_remesh
    • *verticessmallrededgescombine