hm_attributeindexvalue
Returns the value of a double, string, integer or entity ID attribute on an entity.
Syntax
hm_attributeindexvalue entity_type entity_name_or_id attribute_index ?search_type?
Type
HyperMesh Tcl Query
Description
Returns the value of a double, string, integer or entity ID attribute on an entity. For entity ID attributes, if the entity type is supported by ID pools, the solver ID is returned. Otherwise, the HyperMesh internal ID is returned.
Inputs
- entity_type
- The type of entity to query.
- entity_name_or_id
- The name or ID of the entity.
- attribute_index
- The index of the attribute owned by the queried entity (starting at 1).
- 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:
Example
To get the value of the attribute with index 3 on material 6:
hm_attributeindexvalue material 6 3 -byid
Errors
Incorrect usage results in a Tcl error. To
detect errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}