*clearlist

Clears the specified list.

Syntax

*clearlist entity_type list_id ?"by model" <model_name>?

Type

HyperMesh Tcl Modify Command

Description

This command clears the specified list.

Inputs

entity_type
The type of entity on the list.
list_id
The ID of the list to clear. Valid values are 1 and 2.
"by model" <model_name>
The optional model to clear the list from. If not specified, the current model is used.

Examples

To clear the elements on list 1 before creating a new list:
*clearlist elems 1
*createlist elems 1 3 4 5 6
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 "by model".