TCL script for min/max in renumber
Answers
-
I'm not sure if I got your needs correct.
But maybe this helps:hm_createmark assem 1 "advanced" "all"
set assemblyIdList [hm_getmark assem 1]
*clearmark assem
foreach assemblyId $assemblyIdList {
set assemblyName [hm_getvalue assem id=$assemblyId dataname=name]
set compIdList [hm_getvalue assem id=$assemblyId dataname=components]
puts "Assembly: $assemblyId $assemblyName\n"
foreach compId $compIdList { hm_createmark elem 1 "by comp" $compId
set elemList [hm_getmark elem 1]
set elemListSort [lsort -integer $elemList]
*clearmark elem 1
hm_createmark nodes 1 "by comp" $compId
set nodeList [hm_getmark nodes 1]
set nodeListSort [lsort -integer $nodeList]
*clearmark nodes 1
puts "Comp $compId:\nminElemId: [lindex $elemListSort 0] maxElemId: [lindex $elemListSort end]\nminNodeId: [lindex $nodeListSort 0] maxNodeId: [lindex $nodeListSort end]"
}
}}
0