Get mass and volume of each component
Hello Friends,
I have lets say 100 components and I need to display each collector's mass, volume individually, can you please help me out.
With the piece of code shown below i am able to get net mass, volume of all the collectors which are displayed but not able to get individual collectors'
*createmark components 1 'displayed'
set i [hm_getmark comps 1]
foreach j $i {
set a [hm_getmass comps 1 'by comp id' $i]
puts $a
}
Thanks in advance.
Hello Friends,
I have lets say 100 components and I need to display each collector's mass, volume individually, can you please help me out.
With the piece of code shown below i am able to get net mass, volume of all the collectors which are displayed but not able to get individual collectors'
*createmark components 1 'displayed'
set i [hm_getmark comps 1]
foreach j $i {
set a [hm_getmass comps 1 'by comp id' $i]
puts $a
}
Thanks in advance.
Hi,
There is available template for component summary
You can invoke the template from panel Post>summary>load the template 'components'>summary. (optistruct, with other solver, name of the template file may differ)


@Jaggs : last solution is writing yourself a TCL script for that /emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>
Thank you very much for the help people.
I have one more question, i need to find the volume of the solid now and I am using this commant 'hm_getvolumeofsolid solids solidID '.
My question is what is solid id? Is there any difference between solid id and comp id?
Please let me know.
Thank you very much for the help people.
I have one more question, i need to find the volume of the solid now and I am using this commant 'hm_getvolumeofsolid solids solidID '.
My question is what is solid id? Is there any difference between solid id and comp id?
Please let me know.
Yes, there is a difference
solids belong to solid object
comps belong to component object
so solid is different from comp
to get solid ids you can use *createmarkpanel solids 1; puts [hm_getmark solids 1]
to get solid ids stored in component compid you can use *createmark solids 1 'by comp id' $compid;puts [hm_getmark solids 1]


@Jaggs: Have a look at the page 'Data Names' of Hyperworks's help.
*createmark components 1 'displayed'
set i [hm_getmark comps 1]
foreach j $i {
*createmark comps 1 $j
set a [hm_getmass comps 1]
puts $a
}
It is giving the mass of all components because the mark 1 of components has all the displayed components in it. Each time the loop is run the mark needs to be updated with the id of the component.