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
- Can be used when multiple panel levels have been pushed, either using the shortcut
function keys, or the hm_pushpanel command. This option determines
whether to use the current panel or the previous panel for the operation. This option is
relevant only when the list has been created from a panel entity selector under the
above conditions. Valid options are:
- 0 - Use the previous panel (default).
- 1 - Use the current panel.
- model_name
- The optional model to get the list from. If not specified, the current model is used.
Examples
*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
}
*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
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2020 - Added new option model_name.