hm_getlist
Returns an ordered list of entities from an entity list.
Syntax
hm_getlist entity_type list_id ?panel_sensitive? ?model_name?
Type
HyperMesh Tcl Query Command
Description
Returns an ordered list of entities from an entity list.
Inputs
- entity_type
- The type of entity list to query. Valid values are elems, laminates, lines, nodes, plies and surfs.
- list_id
- The ID of the list to query. Valid values are 1 and 2.
- panel_sensitive
- Deprecated. Always set to 0.
- model_name
- The optional model to get the list from. If not specified, the current model is used.
Examples
To create a line from a user specified list of
nodes:
*createlistpanel nodes 1 "Select nodes for the line:"
set node_list [ hm_getlist nodes 1 ];
if { ! [ Null node_list ] } {
*linecreatefromnodes 1 0 150 5 179
}
To create, query, and clear a list from nodes 2, 10, and 3 for model
model-2:
*createlist nodes 1 "by model" model-2 2 10 3
set my_list [hm_getlist nodes 1 0 model-2]
*clearlist nodes 1 "by model" model-2
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
2020 - Added new option model_name.
2023 - Deprecated argument panel_sensitive.