hm_getentityvalue

Returns a single template/data name value for a single entity.

Syntax

hm_getentityvalue entity_type entity_name_or_id data_name output_type ?search_type?

Type

HyperMesh Tcl Query

Description

This command returns a a single template/data name value for a single entity.

Inputs

entity_type
The type of entity to query. All HyperMesh entities are valid.
entity_name_or_id
The name or ID of the entity.
data_name
The data name or template attribute to query. When querying using template names, a dollar sign ($) must precede the attribute name. In addition, make sure that a backslash (\) is used in front of the dollar sign ($).
output_type
The type of output expected. Valid values are:
0 - integer/real number
1 - string
search_type
By default, HyperMesh searches for entities by name, and if the name is not found, it then searches by ID. This option allows you to specify how the search for an entity should be conducted. Valid values are: -byname - Search only by name. -byid - Search only by ID.

Example

To get the first node of element 1:

hm_getentityvalue elems 1 node1.id 0

To get the name of component ID 4:

hm_getentityvalue comps 4 name 1 -byid

To get the thickness of property name window with a PSHELL card image for the OptiStruct template:

hm_getentityvalue props window \$PSHELL_T 0

Errors

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