How to use tcl command *createmark with option "contains value"

Hi,
I am trying to select components via tcl whose name contains the string "DIN". I.e. I want to select all components with the following names: "DIN123", "something.1\DIN891", "this-is-a-component-DIN-2010" and so on.
I tried the following line:
*createmark comps 1 "contains value" name "DIN" 1
But when checking if any components were selected by:
hm_getmark comps 1
I do not get any ids, so aparently my selection was not successful.
What did I do wrong?
Thanks!
Best Answer
-
you should use some wild card (*).
example:
set max_thick [hm_getfloat "Thickness Limit:" "Definie Thickness Limit for detection:"]
#selects all components starting with 21
createmark comps 2 "contains value" name 21*
set bolts_list [hm_getmark comps 2]
*clearmark comps 20
Answers
-
you should use some wild card (*).
example:
set max_thick [hm_getfloat "Thickness Limit:" "Definie Thickness Limit for detection:"]
#selects all components starting with 21
createmark comps 2 "contains value" name 21*
set bolts_list [hm_getmark comps 2]
*clearmark comps 20