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

IsabellaR
IsabellaR Altair Community Member

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

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    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 2

Answers

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    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 2

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.