Move each surface to different components
Altair Forum User
Altair Employee
Hello All,
I am new to Tcl scripting ,require your help for moving each surface into a different component by its name
*createmark surfaces 1 'displayed'
foreach s [hm_getmark surfaces 1] {
set compname[ hm_getentityvalue surfaces $s collector.name 1 ]
It is reading the name of collector but not recognizing the variable compname .
Please hlp
0
Answers
-
OK. this is an easier way:
*createmark surfs 1 displayed; # or *createmarkpanel surfs 1 'Select surfs:' foreach SurfId [hm_getmark surfs 1] { set CompName [hm_getentityvalue surfs $SurfId collector.name 1] *collectorcreateonly comps ${CompName}_$SurfId '' [expr round(rand()*63)+1] *createmark surfs 1 $SurfId *movemark surfs 1 ${CompName}_$SurfId }
0 -
Appreciate your help ,it worked
0