hm_marksearchmode

Defines the ID/name search order for *appendmark and *createmark.

Syntax

hm_marksearchmode mode

Type

HyperMesh Tcl Query

Description

For entities that have both a name and ID, they can be searched by name first then ID or by ID first then name. mode determines this search order for *appendmark and *createmark commands.

Valid modes are
  • 0 – Search for names first, then ID (HM default).
  • 1 – Search for ID first, then name.

This command does not affect hm_appendmark or hm_createmark.

Examples

If the database contains the following components:

name = "1", id = 100
name = "100", id = 1

The following commands will mark the first component (name ="1"):

hm_marksearchmode 0
*createmark comps 1 1

The following commands will mark the second component (name = "100"):

hm_marksearchmode 1
*createmark comps 1 1

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

If mode is invalid, you will get the following error:

hm_marksearchmode: valid values are 0 and 1.