hm_export

Exports data name values for entity hierarchy.

Syntax

hm_export entitytype=<value> <select_type>=<selection> ?<option1>=<value1>? ?<option2>=<value2>? … ?<optionN>=<valueN>?

Type

HyperMesh Tcl Query Command

Description

Exports data name values for selected entity hierarchy in specified file format.

Inputs

entitytype=<value>
The type of the root entity.
<select_type>=<selection>
id=<id>
The ID of the root entity.
mark=<mark_id>
The ID of the mark containing the entities of root entity type.
filepath=<value>
The full path of the output file. File format is derived from file path extension. Supported formats are CSV and HTML.
separator=<value>
The separator character for CSV file.
datanames={<value>}
The list of data names.
labels={<value>}
The list of labels for each data name in the datanames list.
level=<value>
The type of the leaf entity to be queried for the hierarchy. Currently only valid value is components.
numformat=<value>
The numerical format.
0 - Auto
1 - Fixed mode
2 - Scientific mode (exponential)
precision=<value>
The precision of the exported numerical values.
exportheader=<value>
The flag to ignore column header export.
0 – Ignore column headers
1 – Export column headers
consider_part_hierarchy=<value>
The flag to switch export of assembly hierarchy and part hierarchy in case of include as root type. Reserved future use.

Examples

To export assembly hierarchy to HTML file:
*createmark assembly 1 1
hm_export entitytype=assembly mark=1 filepath={C:/MassSummary.html} datanames={mass structuralmass nonstructuralmass} labels={{Total Mass} StructuralM NonstructuralM} level=component numformat=0 precision=4
To export include hierarchy to CSV file with “;” as separator:
hm_export entitytype=includefile id=1 filepath={C:/Inertia.csv} separator={\;} datanames={IXX IYY IZZ IXY IXZ IYZ} level=component numformat=2 precision=5
To export include hierarchy to CSV file without column headers:
hm_export entitytype=includefile id=1 filepath={C:/Inertia.csv} datanames={IXX IYY IZZ IXY IXZ IYZ} level=component numformat=2 precision=5 exportheader=0

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

2023