Jump to content

Recommended Posts

Hello Everyone,


I am new to scripts on HM and learning from examples and tutorials. I want to make macro to check element quality of displayed elements i.e. Min/Max angle, Mi/Max length, duplicates etc in single shot. I am able to create macro to check and highlight nodes on issues elements. However I would like this macro to popuo window and share statement about quality. 

As of now I am using 


hm_usermessage "number of element sides failing for max lentgth= $n "     

This is overwriting previous message and I am able to see only last check details on HM page.

Is there any option which will create text box and write all criaterial by appending previous check and give show as check summary.


Thanks in advance.

Vikas Singh

Share this post

Link to post
Share on other sites

Let's say, you have check results stored in variable CheckResults

You can put it to a text file by using

set fpt [open summary.txt a]

puts $fpt $CheckResults

close $fpt


After finish checking, call notepad.exe to open the file by:

exec notepad.exe summary.txt

Share this post

Link to post
Share on other sites

Thanks Tinh,
Let me check it once. I have another query on same line. I am checking for free 1d in my check macro. However if displayed part done have any free 1D it gives error and macro stops there. Is there any option to set criteria where if run part of macro to check free 1D only if there is 1D elements present in the displayed model.

I am using below command


hm_markclear elements 1
hm_markclear elements 2

*evaltclscript "pamcrash2G/pamcrash2G_proc.tcl" 0
*setactivepage 17
*evaltclstring "::Pamcrash2G::mask_plinks" 0

*createmark elements 1 "displayed"
*createmarklast elements 1;
*elementtestfree1d elements 1 2


I want this function to execute only if there is 1D element present in the display mode. 

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...