Customize Pull-Down Menu's using CSV file in Hyperworks

Manoj Kandukuri_22400
Manoj Kandukuri_22400
Altair Employee
edited April 2023 in Altair Exchange

Overview

The attached zip file contains a script that parses a comma-separated values (CSV) file and generates a dynamic XML file to automatically populate pull-down menus in HyperMesh. Hierarchy in the pull-down menus is created based on the first three columns in the CSV file, namely:  main block, Sub-main, Sub-Group.

Where:

Column Name

Description

main block

Parent navigation item

Sub-main

Sub-menu navigation item

Sub-Group

Second level of navigation item


Supported attributes to the menu button, like text, source/command, tooltip, visibility, etc., are listed in the other columns.

In this example, the following columns are included:

Column Name

Description

text

Name of the tool

source path

Command/source executed when controls are selected

command

Procedure call, if the source file is passed in the “source path” column

tooltip

Tooltip text displayed when hovering over the region

visible

Conditional attribute to show/hide any tags contained within it based on the profiles specified. Visible conditions can be nested.  For example:

  Like: {ProfileName1, ProfileName2, ProfileName3}


*Note: visible attribute is supported in versions 2021.2 or above.

Usage/Installation Instructions

View the below video for a demonstration:


Comments

  • Jack LC_22402
    Jack LC_22402 Altair Community Member
    edited September 2022

    Hello,

    thank you for the script and the video instructions, I tried it and it worked to me.

    What I didn't understand is how to fix the menu, since each time I open Hyperworks I have to reload the script.
    In the previous HM release I had a hmcustom.tcl in the launch folder and HM automatically load my personal menu, now it doesn't work.

    Thanks in advance for the help

  • Ajay Prabhakaran
    Ajay Prabhakaran Altair Community Member
    edited July 2023

    Hello Ben,

    Could you please provide me the hmcustom tcl file also??