Jump to content
Sign in to follow this  
pohan

How to obtain the area of components

Recommended Posts

Hi

I Hypermesh, I use Tool/Mass calc to calculate the area of some components but I could not find the command for TCL.

Could you please explain me?

Thanks

Share this post


Link to post
Share on other sites
11 hours ago, Imoto said:

Hi

 

You can use hm_getmass command.

 

Thanks

Thank you very much. By the way, do you know how to export this result to excel or text file?

Share this post


Link to post
Share on other sites

Yes, please try following lines.

 

set fn [tk_getSaveFile -defaultextension csv];
set fh [open $fn w];
puts $fh "Mass,Volume,Area";
*createmark elems 1 displayed;
lassign [hm_getmass elems 1] mass volume area;
puts $fh "${mass},${volume},${area}";
close $fh;
 

Pandurang and pohan like this

Share this post


Link to post
Share on other sites

Thank you.

I tried this code but the elems could not be selected so I could not get the result. Could you please verify?

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×