🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Popup Window

User: "VikasSingh"
Altair Community Member
Updated by VikasSingh

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

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "VikasSingh"
    Altair Community Member
    OP
    Updated by VikasSingh

    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. 

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Simply, If it has error then use catch command