🎉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

How can I create my own drop down Menu to run customized tcl scripts?

User: "Pramod Kumbhar_22261"
New Altair Community Member
Updated by Pramod Kumbhar_22261

Dear All

I would like to have a separate Drop down menu like  shown in below image.

Once I click on "My Toolbar" my scripts will be shown below as drop down menu which I will execute it.

Kindly Guide me how to add this in customization.

image

Find more posts tagged with

Sort by:
1 - 8 of 81
    User: "ArthurJANNOT"
    Altair Employee
    Updated by ArthurJANNOT

    Hello,

    In HyperWorks Next Gen interfaces, you can manage that directly with extension : https://community.altair.com/community?id=community_blog&sys_id=0c38fa1fdb7401d0cfd5f6a4e296198f&view_source=searchResult

    More detail into online help

    D
    oes it help you?

    Regards,

    Arthur

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    The following might be helpful too:

    https://community.altair.com/community?id=kb_article_view&sysparm_article=KB0119691

    It has an attached script that can at least get you started and is dropdown specific.

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    Both of these suggestions are for the new interface, which you are not showing but I suggest you use.

    User: "Pramod Kumbhar_22261"
    New Altair Community Member
    OP
    Updated by Pramod Kumbhar_22261

    Hello,

    In HyperWorks Next Gen interfaces, you can manage that directly with extension : https://community.altair.com/community?id=community_blog&sys_id=0c38fa1fdb7401d0cfd5f6a4e296198f&view_source=searchResult

    More detail into online help

    D
    oes it help you?

    Regards,

    Arthur

    Hello 

    Thank you. I am currently using classic Hypermesh and I cannot find these options in Classic GUI. Kindly help.

    image

    User: "Pramod Kumbhar_22261"
    New Altair Community Member
    OP
    Updated by Pramod Kumbhar_22261

    The following might be helpful too:

    https://community.altair.com/community?id=kb_article_view&sysparm_article=KB0119691

    It has an attached script that can at least get you started and is dropdown specific.

    Hello 

    Thank you. I am currently using classic Hypermesh and I cannot find these options in Classic GUI. Kindly help.

    User: "ArthurJANNOT"
    Altair Employee
    Updated by ArthurJANNOT

    Hello 

    Thank you. I am currently using classic Hypermesh and I cannot find these options in Classic GUI. Kindly help.

    image

    Hello

    As mentioned by Ben too, those solutions are only working with HW Next Gen interface.
    If you want to have a look of the benefit to use the new one, I'm advising you to consult series of video on our YouTube Channel.
    If you want to learn more, the best way is to contact your local Altair support and planned a training.
    You can also use the self paced training : (generally into : file:///C:/Program%20Files/Altair/2021.2/hwdesktop/hwx/gettingStarted/hwd/HyperWorksGeneral/index.html )
    image

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    Hello 

    Thank you. I am currently using classic Hypermesh and I cannot find these options in Classic GUI. Kindly help.

    What is holding you back from switching to the new interface?

    In classic the approach to add a dropdown is complete different. You will need to create a hmcustom.tcl file and put it in your working directory or point to it with an environment variable.

    I don't have a good example on hand but you will use the hm_framework api to do most of it.

    https://2022.help.altair.com/2022/hwdesktop/hwd/topics/reference/hm/hm_framework.htm?zoom_highlight=hm_framework

    Here are some examples of what the code might look like but is certainly not everything:

    set top_menu [hm_framework getpulldowns]  catch {$top_menu delete [$top_menu index "Custom Tools"]} # Destroy existing menu if exists catch {destroy $top_menu.custom} # Create new menu menu $top_menu.custom -tearoff false $top_menu insert end cascade -label "Custom Tools" -menu $top_menu.custom set custom_menu $top_menu.custom   $custom_menu add command \         -label "What's new..." \         -command "source {[file join $dirVersion resources WhatsNew.tcl]}"

    This should get you started but again I would strongly encourage you to do this in the new interface.  I think it makes more sense to learn to do this in the new interface now then learn to do it in the old interface then have to migrate your tools to the new interface eventually anyways.

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    What is holding you back from switching to the new interface?

    In classic the approach to add a dropdown is complete different. You will need to create a hmcustom.tcl file and put it in your working directory or point to it with an environment variable.

    I don't have a good example on hand but you will use the hm_framework api to do most of it.

    https://2022.help.altair.com/2022/hwdesktop/hwd/topics/reference/hm/hm_framework.htm?zoom_highlight=hm_framework

    Here are some examples of what the code might look like but is certainly not everything:

    set top_menu [hm_framework getpulldowns]  catch {$top_menu delete [$top_menu index "Custom Tools"]} # Destroy existing menu if exists catch {destroy $top_menu.custom} # Create new menu menu $top_menu.custom -tearoff false $top_menu insert end cascade -label "Custom Tools" -menu $top_menu.custom set custom_menu $top_menu.custom   $custom_menu add command \         -label "What's new..." \         -command "source {[file join $dirVersion resources WhatsNew.tcl]}"

    This should get you started but again I would strongly encourage you to do this in the new interface.  I think it makes more sense to learn to do this in the new interface now then learn to do it in the old interface then have to migrate your tools to the new interface eventually anyways.

    And I think the new way is easier :)