hm_getlist
Returns an ordered list of entities from an entity list.
Syntax
hm_getlist entity_type list_id ?panel_sensitive?
Type
HyperMesh Tcl Query
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.
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
}
Errors
Incorrect usage results in a Tcl error. To
detect errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}