Automated mass calc
I have a model with around 1400 property cards. I need to know the mass of the elements for each property. I started doing this manually by right-clicking property -> 'isolate only', selecting all visible elements, and doing mass calc. However, this will take forever to do for all 1400 properties. Is there any way to automate this process?
Alternatively, if there is a way to calculate the mass for each material card, that would be useful as well. However, parts of the model are composites with multiple materials in a property, so this probably isn't possible.
Answers
-
Goto model browser and select component view (3rd icon) . You can see the mass, thickness, material everything assigned to the components there.
0 -
Thank you for responding, Udhay. Unfortunately, that won't work in this case because each component in my model has around 200 different properties within it. The masses I'm looking for aren't for the components, but the mass of all of the elements that have a specific property assigned. I can do this manually by isolating the elements of that property, selecting them, and using the mass calc tool, but that would take forever to do for 1400 properties. I was wondering if this was possible to do with a macro, for example, to speed it up.
0 -
Hi @paul_a,
You can try a macro like this to save property information to csv file.
set fpt [open [tk_getSaveFile -defaultextension .csv] w]
puts $fpt 'property name,mass'
set allProps [hm_entitylist props name]
foreach pName $allProps {
*createmark elems 1 'by property name' $pName
set temp [hm_getmass elems 1]
set mass [lindex $temp 0]
puts $fpt '$pName,$mass'
}
close $fpt0 -
Vipin, thank you so much, this worked and saved me about 12 hours of repetitive clicking.
0 -
Altair Forum User said:
Hi @paul_a,
You can try a macro like this to save property information to csv file.
set fpt [open [tk_getSaveFile -defaultextension .csv] w]
puts $fpt 'property name,mass'
set allProps [hm_entitylist props name]
foreach pName $allProps {
*createmark elems 1 'by property name' $pName
set temp [hm_getmass elems 1]
set mass [lindex $temp 0]
puts $fpt '$pName,$mass'
}
close $fptHello Vipin, I need to use comps instead of elems and extract the masses to a variable. I'm trying the same procedure as you mentioned, but not able to get mass for all components. Can you help. TIA.
0 -
0