A program to recognize and reward our most engaged community members
Hello everyone,
I am attempting to query Hypermesh for a list of collectors (either Name or ID) so that I can loop through and perform actions on each individually. Is there any way to get this info?
Thank you!
*createmark loadcols 1 "all" ; #select all loadcols and add to mark #1
set loadcols_list [hm_getmark loadcols 1] ; #store the selection from mark #1 to a list
set loadcols_name [hm_getvalue loadcols user_ids=$loadcols_list dataname=name] ; #retrieves the list of names
#foreach load collector, do something
foreach loadcolo $loadcols_list loadcol_namo $loadcols_name {
puts "ID: $loadcolo name: $loadcol_namo"
}
*createmark loadcols 1 "all" ; #select all loadcols and add to mark #1 set loadcols_list [hm_getmark loadcols 1] ; #store the selection from mark #1 to a list set loadcols_name [hm_getvalue loadcols user_ids=$loadcols_list dataname=name] ; #retrieves the list of names #foreach load collector, do something foreach loadcolo $loadcols_list loadcol_namo $loadcols_name { puts "ID: $loadcolo name: $loadcol_namo" }
sorry...just re-read the question, and you didn't ask load collector, but 'collector'.
If it is component, this works the same, just change to 'comps' instead of 'loadcols'
Thank you for the quick reply. I will give that a shot!
I had though of attempting to build the list via hm_getcollectorname ignoring any that return errors. But I am not sure if there is a maximum value for collector ID to have complete coverage.