hm_info

Query general information about HyperMesh options and paths.

Syntax

hm_info option|-appinfo info_option ?value?

Type

HyperMesh Tcl Query Command

Description

This command returns general information about HyperMesh options and paths.

Inputs

-appinfo info_option
Valid info_option values are:
  • ALTAIR_HOME: Current installation base directory.
  • ARCHITECTURE: Current system architecture.
  • COPYRIGHT: The HyperWorks copyright text.
  • CURRENTWORKINGDIR: Current working directory.
  • DISPLAYVERSION: The full application version number (for example, 10.0b40).
  • EXECUTABLEDIR: Full directory path of the application’s executable. Same as HMBIN_DIR.
  • EXECUTABLEPATH: Full directory path and file name of the application’s executable.
  • FILEVERSION: The exact version string created by the template variable hmversion during export.
  • HMBIN_DIR: Full directory path of the application’s executable. Same as EXECUTABLE_DIR.
  • LICENSE_FEATURE: Application’s license feature.
  • LICENSEVERSION: Application’s license version.
  • NAME: Get the applications name.
  • PATCH_NUMBER: The base application patch number (for example, 101, 102).
  • SPECIFIEDPATH type: Full path name of the specified type. Valid type values are:
    • altair_lic.dat
    • EXTERNALFUNCS_DIR
    • EXTERNALREADERS_DIR
    • EXTERNALWRITERS_DIR
    • hm
    • hm_dll_readers
    • hm_feinput_readers
    • hm_module
    • hm_scripts_dir
    • hm_user_profiles
    • hm40_translator
    • hw_help_dir
    • hw_readers
    • hw_tcl_common
    • hyperbeam
    • mv_solver_writers
    • nastran_to_abaqus_converter
    • python_fullpath
    • radioss_launchdir
    • standard_statistics_template
    • tcl_lib
    • TEMPLATES_DIR
    • tk_lib
    • TRANSLATORS_DIR
    • wish
  • SUPPORTEMAIL: The HyperMesh tech support email address.
  • TITLE: Title of the application.
  • TITLEVERSION: Version associated with the title of the application.
  • VERSION: The base application version number (for example, 10.0).
  • XDISPLAYNAME: The name of the current X display.
cardprev_displayed
Returns 1 if the card previewer is displayed; 0 otherwise.
currentcollector type
Returns the current collector ID of the specified type or 0 for no current collector. Valid type values are beamsectcol, comp, loadcol, module, systcol, and vectorcol.
currentcomponent
Returns the current component collector ID.
currentinclude
Returns the current include file shortname.
currentfile
Full path and file name of the current HyperMesh database. Identical to hmfilename.
database_empty
Returns 1 if the database is empty; 0 otherwise.
database_modified
Returns 1 if the database has been modified since the last save operation; 0 otherwise.
emptylist entity_type
Returns the list of empty entities of the given entity_type. Valid entity_type values are: assems and comps
entity_types_allowing_undefined
Returns the entity types that are supported as allowing undefined entities.
executing_command
Returns 1 if HyperMesh is currently in the process of executing a command; 0 otherwise.
functionlock
Returns 1 if HyperMesh is currently in the function lock mode due to being in a secondary menu like automeshing; 0 otherwise.
geomstyle
Returns the geometry color mode value set by *settopologydisplaytype.
hmfilename
Full path and file name of the current HyperMesh database. Identical to currentfile.
hyperstudy_running
Returns 1 if HyperStudy is currently in the process of running after being launched from HyperMesh; 0 otherwise.
istemplateloaded
Returns 1 if a template file is loaded; 0 otherwise.
lastselectedentity entity_type
Returns the ID of the entity of the specified entity_type that has been selected using *createentitypanel. This command must be called immediately after the *createentitypanel command. If there are any errors or no entity has been selected, the value returned will be 0.
prompting
Returns 1 if HyperMesh is currently prompting the user for an immediate response using an Overlay or a Popup; 0 otherwise.
pushtofront entity_type
Returns the value set by *pushtofront for the specified entity type. Currently only supported for tags.
readingfile
Returns 1 if HyperMesh is currently in the process of reading an HM file; 0 otherwise.
reviewmode
Returns the review mode value set by *setreviewmode.
somethingtoreject
Returns 1 if the reject operation will have any effect if executed now; 0 otherwise.
templatecodename
The name reported from the current template’s *codename() command.
templatefilename
Full path and file name of the current tempate file.
templateid
The ID reported from the current template’s *codename() command.
templatetype
Current template type. This is one of the predefined template types, currently one of the following: nastran, abaqus, autodv, hyperopt, pamcrash, patran, ansys, lsdyna, simex, phlex, pdm, mainfile, or none. Some template type names are not reported.
tempnam
Full path and file name of a temporary file. The value returned from each call is unique.
unusedlist entity_type
Returns the list of unused entities of the given entity_type. The list will contain names for named entity types and IDs for all other types. Valid entity_type values are curves, contactsurfs, mats, props, and systs.
writeviewcommands
Returns the value set by hm_writeviewcommands or the -nowriteviewcommands start-up option.

Examples

To get the path to the Altair home directory:
set trans_dir [hm_info -appinfo ALTAIR_HOME]
To get the path to the translators directory:
set trans_dir [hm_info -appinfo SPECIFIEDPATH TRANSLATORS_DIR]
To get the current vector collector:
set cur_veccol [hm_info currentcollector vectorcol]

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

2020 - Added new -appinfo option FILEVERSION.

2023 - Deprecated options macrofilename and macromenupage. Removed options analysisfileset, commandfilename, exportfilename, exporttemplate, importfilename, importtranslator, plottingdisplay, and resultfileset.

2024 - Removed value hm_mac from -appinfo SPECIFIEDPATH.

2024.1 - Added new -appinfo option TITLEVERSION.