creating components out of sets
Hello!
I would like to create many components out of many sets. The elements should be moved to the new component and the created component should have the same name as the set.
Is that possible?
Thanks
Answers
-
Try my code:
*createmarkpanel sets 1 'Select sets ' set set_ids [hm_getmark sets 1] *clearmark sets 1 foreach id [lsort $set_ids] { set name [hm_entityinfo name sets $id] *createentity comps name=$name *createmark elems 1 'by set id' $id *movemark elements 1 '$name' *clearmark elems 1 }
HTH,
0 -
Thank you very much!
But I think there is a problem in the While Loop. Hypermesh reports the Error: Please specify a valid collector name.
I've tried the code without the line *movemark elements 1 '$name' and all the components were created fine with the right name.
So the problem must be the move command in the code.
I am working with HW 14.
That´s the Log:
0 while executing '*movemark elements 1 '$name'' ('foreach' body line 5) invoked from within 'foreach id [lsort $set_ids] { set name [hm_entityinfo name sets $id] *createentity comps name=$name *createmark elems 1 'by set id' $id *movemark ...' (file 'C:/Users/censored/Desktop/test.tcl' line 5) invoked from within 'source {C:/Users/censored/Desktop/test.tcl}' ('uplevel' body line 1) invoked from within 'uplevel #0 'source {$file}'' (procedure '::HM_Framework::p_FileLoad' line 68) invoked from within '::HM_Framework::p_FileLoad 24' (menu invoke)
Thank you!
0 -
oooh, i think the problem could be my fault!
Because I fear that it could be that some elements are in more than just one set are deposited.
Is it possible to add to the move line, that the elements should be duplicated?
Thank you!
0 -
.
0 -
I ask for help!
Thank you
0 -
.
0