How to find the smallest element and corresponding component by script?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi all,

How to find the smallest element and corresponding component by script and only show the component in the display window and highlight the smallest element? 

 

Roy

Answers

  • tinh
    tinh Altair Community Member
    edited December 2018

    Why do you need to do it by script?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2018

    Why do you need to do it by script?

    A convenient button should be defined for simple use. So I want to script this. Could you help me with this?

     

    Roy

  • tinh
    tinh Altair Community Member
    edited December 2018

    I don't know direct command, a way to do is

    -use *elementtestlength with a given threshold

    -it will raise a message reports min length 

    -take that min length and use *elementtestlength with that value

     

    But the message will be delay because it is raised by a timer proc

    So you have to wait for it (tkwait)

     

     

     

    If min length is shortestside, we can use hm_getvalue very easily.