hm_bag_getentitylistmax
Returns the number of entities of a specific type in a bag.
Syntax
hm_bag_getentitylistmax name_or_id entity_type ?search_type?
Type
HyperMesh Tcl Query
Description
This command returns the number of entities of type entity_type in the bag.
Inputs
- name_or_id
- The name or ID of the queried bag entity.
- entity_type
- The type of entity to query from within the bag.
- ?search_type
- By default, HyperMesh searches for entities by name, and if the name is not found, it then searches by ID.This option allows you to specify how the search for an entity should be conducted. The two options are:
Examples
To get the number of optimization responses in bag ossetup1:
hm_bag_getentitylistmax ossetup1 optiresponses -byname
To get the number of design variable links in a bag of ID 3:
hm_bag_getentitylistmax 3 desvarlinks -byid
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
10.0