Preference File - Custom DropDown Menus for HV / HG / HM

User preference files can be used to define custom dropdown menus. The following process shows how to add dropdown menus and connect them to TCL scripts.

Note that the new Extension technology will add similar and more functionalities, especially w.r.t. the ribbons in our nextGeneration GUI interface. Visit this Knowledge Base article to learn more about Extensions and adding custom user buttons:


The user should create an ASCII file with arbitrary name, and place (recommended) outside of any Altair installation folder, to make sure it does not get lost during e.g. Altair updates. Multiple users can access the same preference file.


The syntax of the preference statements is as follows (example package attached):

GraphicDefaults are used for HyperView, PlotDefaults for HyperGraph and FepreDefaults for HyperMesh.

The paths to the script locations have to be adapted.


*Id("HyperWorks v21.0")

                *BeginMenu(dummy, "User-DropDown-HV")
                    *MenuItem(dummy, "Load Dyna Bumper", TCL, {"D:/KB/Data/load_dyna-bumper_HWC.tcl"})
                    *MenuItem(dummy, "Load Housing", TCL, {"D:/KB/Data/load_housing_HWC.tcl"})     

                    *BeginMenu(dummy, "Sub-DropDown 1")
                        *MenuItem(dummy, "Create Views", TCL, {"D:/KB/Data/create_views.tcl"}) 

                *BeginMenu(dummy, "User-DropDown-HG")
                    *MenuItem(dummy, "Plot Lower Torso - Res", TCL, {"D:/KB/Data/HG_plot_1.tcl"})
                    *MenuItem(dummy, "Plot Head - Res", TCL, {"D:/KB/Data/HG_plot_2.tcl"})     

                    *BeginMenu(dummy, "Sub-DropDown 1")
                        *MenuItem(dummy, "add Datum lines", TCL, {"D:/KB/Data/Add_DatumLines.tcl"}) 

                *BeginMenu(dummy, "User-DropDown-HM")
                    *MenuItem(dummy, "Average Elem Size 2D", TCL, {"D:/KB/Data/AverageElemSize.tcl"})
                    *MenuItem(dummy, "Average Elem Size 3D", TCL, {"D:/KB/Data/AverageElemSize_FEsolids.tcl"})
                    *MenuItem(dummy, "Average Elem Size 3D cubic root", TCL, {"D:/KB/Data/AverageElemSize_FEsolids_CubicRoot.tcl"})     

                    *BeginMenu(dummy, "Sub-DropDown 1")
                        *MenuItem(dummy, "Elem Area 2D", TCL, {"D:/KB/Data/elem_area_2.tcl"}) 




To reference the preference file, the user has to invoke following menu from the HyperWorks GUI:




From here, the preference file has to be

1. Registered 

2. Selected in the preferences list

3. Loaded 




 Once successfully loaded, the label will appear in bold font:




 The example preference file will create below dropdown menus, from where the referenced TCL scripts can be executed: