tcl - selecting all elements of a component
Hey
I'm making a tcl script and i want to create add elements to a set by a collector. normaly i would do elements -> by collector -> select collector.
but the command file just gives me:
Best Answer
-
you could create a list of elems first:
I believe it would be something like this.
set comp_ID 10;
*createmark elems 1 "by comp id" $comp_ID; #select elements by comp (maybe by collector or comp name)
set elems_list [hm_getmark elems 1]; #store in a list
*clearmark elems 1
eval "*setvalue sets id=1 ids=\{elems $elems_list\}" ; #write the command to a string and then 'eval' the resulting string
*setvalue sets id=1 STATUS=0 5422=LISTsomethng like this might work..sorry, i haven't tested it.
0
Answers
-
you could create a list of elems first:
I believe it would be something like this.
set comp_ID 10;
*createmark elems 1 "by comp id" $comp_ID; #select elements by comp (maybe by collector or comp name)
set elems_list [hm_getmark elems 1]; #store in a list
*clearmark elems 1
eval "*setvalue sets id=1 ids=\{elems $elems_list\}" ; #write the command to a string and then 'eval' the resulting string
*setvalue sets id=1 STATUS=0 5422=LISTsomethng like this might work..sorry, i haven't tested it.
0 -
Adriano A. Koga_21884 said:
you could create a list of elems first:
I believe it would be something like this.
set comp_ID 10;
*createmark elems 1 "by comp id" $comp_ID; #select elements by comp (maybe by collector or comp name)
set elems_list [hm_getmark elems 1]; #store in a list
*clearmark elems 1
eval "*setvalue sets id=1 ids=\{elems $elems_list\}" ; #write the command to a string and then 'eval' the resulting string
*setvalue sets id=1 STATUS=0 5422=LISTsomethng like this might work..sorry, i haven't tested it.
yes that worked thank you
0