Is there any script to get the component ID if the component name is known?

Sanit Bhatkar_21192
Sanit Bhatkar_21192 Altair Community Member
edited June 2021 in Community Q&A

1. comp_name = Random name was set. Same name component is made.

2. I was running this code but it is not selecting the desired component. Message is showing "No change. Total selected 0".

{

hm_createmark comps 1 "by name only" "$comp_name";

}

3. I wanted to know if we can get component id if component name is stored in variable.

Tagged:

Best Answer

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited June 2021 Answer ✓

    set comp_id [hm_getvalue comps name=$yourname dataname=id]

Answers