hm_attributevalue
Returns the value of a double, string, integer or entity ID attribute on an entity for the current template.
Syntax
hm_attributevalue entity_type entity_name_or_id attribute_name_or_id ?search_type?
Type
HyperMesh Tcl Query
Description
Returns the value of a double, string, integer or entity ID attribute on an entity for the current template. For entity ID attributes, if the entity type is supported by ID pools, the solver ID is returned. Otherwise, the HM internal ID is returned.
If the attribute does not exist on the entity, or is not an attribute from the current template, an error is returned.
Inputs
- entity_type
- The type of entity to query.
- entity_name_or_id
- The name or ID of the entity.
- attribute_name_or_id
- The name or ID of the attribute to query. The attribute must be in the current template.
- 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:
Examples
To get the value of the attribute named Rho on material 6 for the LS-DYNA template:
hm_attributevalue material 6 Rho -byid
To get the value of attribute ID 118 on material 6 for the LS-DYNA template:
hm_attributevalue material 6 118 -byid
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
10-SA1-110