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_mac
    • hm_module
    • hm_scripts_dir
    • hm_user_profiles
    • hm40_translator
    • hw_help_dir
    • hw_readers
    • hw_tcl_common
    • hyperbeam
    • hypercrash
    • mv_solver_writers
    • nastran_to_abaqus_converter
    • 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.
  • VERSION: The base application version number (for example, 10.0).
  • XDISPLAYNAME: The name of the current X display.
analysisfileset
Returns 1 if the global results file is set; 0 otherwise. Identical to resultfileset.
cardprev_displayed
Returns 1 if the card previewer is displayed; 0 otherwise.
commandfilename
Full path and file name of the command file from the "files" panel. This option cannot be used in HyperMesh Batch Mode.
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, multibody, 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.
elems_cleanup
Returns 1 if the user is in the quality index panel; 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.
exportfilename
Full path and file name of the export file from the "files" panel. This option cannot be used in HyperMesh Batch Mode.
exporttemplate
Full path and file name of the export template from the "files" panel. This option cannot be used in HyperMesh Batch Mode.
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.
importfilename
Full path and file name of the import file from the "files" panel. This option cannot be used in HyperMesh Batch Mode.
importtranslator
Full path and file name of the import translator from the "files" panel. This option cannot be used in HyperMesh Batch Mode.
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.
macrofilename
Full path and file name of the macro file. This option cannot be used in HyperMesh Batch Mode.
macromenupage
Returns the page number that the Utility tab is currently set to.
plottingdisplay
Returns 1 if HyperMesh is currently involved in a plotting process that makes use of the alternative display list (fill plot for hidden lines, contour, etc…); 0 otherwise.
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.
resultfilename
Full path and file name of the result file.
resultfileset
Returns 1 if the global results file is set; 0 otherwise. Identical to analysisfileset.
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, marc, autodv, hyperopt, pamcrash, patran, ansys, lsdyna, dytran, simex, phlex, pdm, masterfile, or none. Some template type names are not reported. For example, a madymo template will be reported as an lsdyna template.
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, ellipsoids. mats, mbjoints, 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.