hm_getvalue
Queries data names and attributes on entities.
Syntax
hm_getvalue entity_type <select_type>=<selection> dataname=<data name or attribute name/ID> ?row=<row_index>? ?column=<column_index>? ?locationunit={<entity_id> <face_index>}? ?modelname=<name_of_model>?
Type
HyperMesh Tcl Query Command
Description
Queries data names and attributes on entities. It will return the value of any type of data name or attribute of an entity. In addition, this command will also return the value at a specific index for array type of data names and attributes.
Inputs
- entity_type
- The type of entity to query.
- <select_type>=<selection>
- The entity or entities that are to be queried. There are several ways to provide the
entities to be queried. Only one option can be used at a time:
- id=<id>
- The ID of the single entity to query.
- name=<name>
- The name of the single entity to query.
- mark=<mark_id>
- The ID of the mark containing the entities to query.
- list=<list_id>
- The ID of the list containing the entities to query.
- user_ids={<id1> <id2> ... <idN>}
- The IDs of one or more entities to query.
- user_names={<name1> <name2> ... <nameN>}
- The names of one or more entities to query.
- dataname=<data name or attribute name/ID>
- The dataname=value data name and/or attribute pair that defines the relevant data to query. For attributes, this can be either the attribute name or ID.
- column=<column_index>
- This is the optional column index for a 2D array. Used together with row_index, it returns the value at the specified row_index and column_index.
- locationunit={<entity_id>, <face_index>}
- Valid only for engineering loads. This is required if a non-uniform load is being queried. If the load is applied on a regular set, only <entity_id> is needed. If the load is applied on solid element faces, then <face_index> is also required.
- modelname=<name_of_model>
- This is the optional model name to query when there are multiple models in the database. If not specified, the current model is used.
- row=<row_index>
- This is the optional row index for a 1D or 2D array. For 1D array, it returns the single value at the specified index. For a 2D array, it will return the entire row.
Examples
hm_getvalue sets name=node_set dataname=ids
hm_getvalue sets id=1 dataname=name
hm_getvalue mats id=1 dataname=Rho
hm_getvalue mats id=1 dataname=183
hm_getvalue comps mark=1 dataname=materialid
hm_getvalue elems list=1 dataname=node1
hm_getvalue comps user_names={mid center} dataname=materialid
hm_getvalue includes id=10 dataname=typesundersubmodel
hm_getvalue mats id=1 dataname=Rho modelname=model-2
hm_getvalue loads id=5 dataname=magnitude locationunit={15}
hm_getvalue loads id=5 dataname=magnitude locationunit={25,2}
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
13.0
2020 - Added new options locationunit and modelname.