Get set ID by using name
Guy01
Altair Community Member
Hello
I am trying to get a set ID number by knowing its name.
Its not working (i have followed the user guide).
The commands i am using:
set set_name [hm_getstring 'Set Name=' 'Enter set name:'] -> here i am retrieving the set name by user input
tk_messageBox -message 'Id name: $set_name'
set set_id [hm_getentityvalue sets $set_name id 0 -byname]
tk_messageBox -message 'Id num: $set_id'
Thanks in advance
0
Answers
-
When you have set name, you can get set ID by following command:
set set_id [hm_getvalue sets name='E_1' dataname=id]
When you have set ID, you can get set name by following command:
set set_name [hm_getvalue sets id=2 dataname=name]
0 -
This works. Thanks a lot for the help.
0