hm_checkmark
Determines if the specified entity exists on the specified mark
Syntax
hm_checkmark entity_type mark_id entity_id ?panel_sensitive?
Type
HyperMesh Tcl Query Command
Description
This command determines if the entity of entity_type and with entity_id exists on mark mark_id. Valid mark_ids are 1 and 2. If entity_id exists on mark_id, a value of 1 is returned. Otherwise, a value of 0 is returned.
If no ?option? is specified, "by name only" is used for entities with names. Otherwise, "by id only" is used.
- 0 - Use the previous panel (default).
- 1 - Use the current panel.
Examples
To determine if element with ID 100 is on mark 1 and display a message if it is:
if {[hm_checkmark elems 1 100]} {
puts "Element 100 is on mark 1";
}
A mark of loads is created in the delete panel. The mask panel has been pushed using the command hm_pushpanel mask. A mark of loads is created in the mask panel. From the mask panel:
To check if load 10 is on mark 1 created from the mask panel:
if {[hm_checkmark loads 1 10 1]} {
puts "Load 10 is on mark 1 from the mask panel";
}
To check if load 10 is on mark 1 created from the delete panel:
if {[hm_checkmark loads 1 100 0]} {
puts "Element 100 is on mark 1 from the delete panel";
}
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
If entity_type is invalid, you will get the following error:
hm_checkmark: invalid entity type specified
If mark_id is invalid, you will get the following error:
hm_checkmark: invalid markmask specified