HyperWorks Desktop

*BrowserContextMenuItem()

Creates a new, user-defined context sensitive menu item in the session browser that links selected items to TCL scripts.

*BrowserContextMenuItem()

Creates a new, user-defined context sensitive menu item in the session browser that links selected items to TCL scripts.

Previous topic Next topic No expanding text in this topic  

*BrowserContextMenuItem()

Creates a new, user-defined context sensitive menu item in the session browser that links selected items to TCL scripts.

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Syntax

*BrowserContextMenuItem(label, path, TCL procedure, entity type)



Arguments

Name

Description

 

label

The label displayed when you right-click on the context sensitive menu.

 

path

Path to the TCL script field that gets sourced when the menu item is selected.

 

TCL procedure

TCL procedure that is executed when a menu item is selected.

The following five arguments are passed to this TCL procedure for each selected item in the session browser:

Page ID
Window ID
Entity Type
Entity ID
Point Number

Each of these arguments is one-based.  Point Number allows the same procedure to work for HyperGraph window context menus and session browser context menus.  When the procedure is called from a session browser context menu, an arbritrary value is passed for Point Number.

 

entity type

Entity to which the menu is associated.  Possible values include plot, curve, or page.

Example

*BeginDefaults()

 

    *BrowserContextMenuItem("Turn On",{getenv("ALTAIR_HOME") + "/utility/scripts/plotting/general_context_menu_curve.tcl"},::general_curve_context_menu::on_selected_curves,curve)

    *BrowserContextMenuItem("Turn Off",{getenv("ALTAIR_HOME") + "/utility/scripts/plotting/general_context_menu_curve.tcl"},::general_curve_context_menu::off_selected_curves,curve)

    *BrowserContextMenuItem("Delete",{getenv("ALTAIR_HOME") + "/utility/scripts/plotting/general_context_menu_curve.tcl"},::general_curve_context_menu::delete_selected_curves,curve)

 

    *BeginBrowserContextMenu("Single Curve Math")

       *BrowserContextMenuItem("Integral",{getenv("ALTAIR_HOME") + "/utility/scripts/plotting/include/context_menu_curve.tcl"},::vst_curve_context_menu::integrate_curve,curve)

       *BrowserContextMenuItem("Double Integral",{getenv("ALTAIR_HOME") + "/utility/scripts/plotting/include/context_menu_curve.tcl"},::vst_curve_context_menu::dblintegrate_curve,curve)

       *BrowserContextMenuItem("Derivitive",{getenv("ALTAIR_HOME") + "/utility/scripts/plotting/include/context_menu_curve.tcl"},::vst_curve_context_menu::derivitive_curve,curve)

    *EndBrowserContextMenu()

 

*EndDefaults()

Application

HyperGraph.

Context

*BeginDefaults() block.

See also

 

*BeginBrowserContextMenu()

List of Preference Statements