🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How can I make this script work ?

User: "Fadi Chamoun_21158"
Altair Community Member
Updated by unknown
Hello,
I found this script and I was trying to use it in order to separate each surface (that are in a single component) into a different new component.
 
*createmark surfs 1 displayed
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 }
 
But it's giving me this error "Collector specified not found in model" when trying to excecute line 3 I think.
Does anyone know what's wrong ?
Thank you for your help.

Find more posts tagged with