How to create a new tcl/tk environment

ThomasCook
ThomasCook Altair Community Member
edited September 2023 in Community Q&A

We know that if we want to create a new model, we just need to click File-- new-- model, so how to create a new tcl/tk environment.

In other word, how do I clear  all the variables, function, handles and so on that I've defined in the command window.

thanks.


Best wishes.

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Jason_Craanen
    Jason_Craanen
    Altair Employee
    edited September 2023

    Hello,

    You can Clear the window by a right-mouse-button click

    image

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023

    Opening a new session of HyperMesh guarantees all the variables etc. are clear.

    Otherwise working in a namespace makes this easier as you can delete the whole namespace.

    image

  • ThomasCook
    ThomasCook Altair Community Member
    edited September 2023

    Opening a new session of HyperMesh guarantees all the variables etc. are clear.

    Otherwise working in a namespace makes this easier as you can delete the whole namespace.

    image

    Thanks for your reply, but the result I got is different from what you said.

    I open HyperMesh and enter <span style="color: #b96ad9;"><span style="color: #000000;">set var 1.2; puts $var</span></span> in command windows,

    Window Output 1.2

    then I click File---New---Session, and I continue to put $var in command windows

    Window Output 1.2

    image

    So opening a new Session does not empty the previous variables

  • ThomasCook
    ThomasCook Altair Community Member
    edited September 2023

    Hello,

    You can Clear the window by a right-mouse-button click

    image

    Thanks, but this is not the method to clear all variables and handle etc..

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023
    Meng yu said:

    Thanks for your reply, but the result I got is different from what you said.

    I open HyperMesh and enter <span style="color: #b96ad9;"><span style="color: #000000;">set var 1.2; puts $var</span></span> in command windows,

    Window Output 1.2

    then I click File---New---Session, and I continue to put $var in command windows

    Window Output 1.2

    image

    So opening a new Session does not empty the previous variables

    Sorry, bad choice of words. What I meant is a new window.

  • ThomasCook
    ThomasCook Altair Community Member
    edited September 2023

    Sorry, bad choice of words. What I meant is a new window.

    Anyway, thank you so much.

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited September 2023
    Meng yu said:

    Anyway, thank you so much.

    Using HWC is a good way of avoiding handles too.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.