TCL SCRIPT FOR VOLUME OF COMPS
Felippe Oliveira
Altair Community Member
Answers
-
Hi,
hm_getmass
can be used to get the volume of a component with id $comp_id:*createmark comps 1 $comp_id
set temp [hm_getmass comps 1]
set mass [lindex $temp 0]
set <strong>vol </strong>[lindex $temp 1]
set area [lindex $temp 2]
foreach comp_id [hm_entitylist comps id] {}
can be used to loop through all comp ids.At last a tcl list lst_vols can be writen to a .csv file:
set data [join $lst_vols "\n"]
set tempfile [open $filepath w+]
puts $tempfile $data
close $tempfile
Enjoy your HM scripting!0