proc p_derived_bars args {
*createmarkpanel elems 1 "select 3d elems"
set buff1 ""
set buff2 ""
set i 0; set j 0
foreach NodeList [hm_getvalue elems mark=1 dataname = nodes] cx [hm_getvalue elems mark=1 dataname=centrex] cy [hm_getvalue elems mark=1 dataname=centrey] cz[hm_getvalue elems mark=1 dataname=centrez] {
append buff1 "GRID,[incr i],,$cx,$cy,$cz\n"
foreach NodeId $NodeList {
append buff2 "PLOTEL,[incr j],$i,$NodeId\n"
}
}
set fpt [open temp.fem w]
puts $fpt $buff1
puts $fpt $buff2
close $fpt
}
我看不到多余的空间在哪里,有人介意帮助我吗?这是用于Hypermesh。
答案 0 :(得分:4)
在这里,您缺少空格:
cz[hm
这将导致错误数量的参数传递给foreach。