hi,
i had created a script that could get the values of hole radii and create a beam section for each radii. Here's the script for the same.
but i am facing the error as below
Error:

Script:
*clearmarkall 1
*clearmarkall 2
*createentity beamsectcols includeid=0 name="beamsectcol1"
hm_holedetectioninit
*createmarkpanel surfaces 1
hm_holedetectionsetentities surfs 1
hm_holedetectionsetholeparams hole_shape=31
hm_holedetectionfindholes 1
set n [hm_holedetectiongetnumberofholes]
for {set k 0} {$k < $n} {incr k} {
set r [hm_holedetectiongetholedetails $k radius]
}
set j 1
for {set i 0} {$i < $n} {incr i} {
set rad [lindex $r $i]
*createentity beamsects includeid=$i name="beamsection_$j"
*setvalue beamsects id=$j sectiontype=60
*setvalue beamsects id=$j beamsect_dim1=$rad
incr j
}
hm_holedetectionend
i do not understand as to what i am doing wrong. Help is greatly appreciated.
Thanks,