Clean all variables in HyperMesh

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

Hi,

I am trying my macros on the command window in HyperMesh.
Is there any function to clean all variables ?

I tryied historyclear but it doesn't work.

 

Thanks.

Regards,

Cya.

Answers

  • tinh
    tinh Altair Community Member
    edited March 2014

    Hello,

    yes, there is

    but some variables is essential for hm running, if you clear them means hm will be malfunctional

    try:

    foreach var [info vars *] {catch {unset $var}}

     

    so you should put your variables in your own namespace so you can clean it properly

    foreach yourvar [info vars ::yournamespace::*] {catch {unset $yourvar}}

    or just delete your namespace, the vars will be freed from interp