Product Logo

CNS Menu

Dynamic Menus

Functions

CNSMenu_Configure

NameCNSMenu_Configure
Description

Calling this function with no parameters will open the CNS Menu Configuration Dialog. You can optionally open to a specific tab by specifying the name of the tab as the “Option” parameter. This function also allows you to get or set any preference found in the Configuration Dialog.

Valid PrefNames:

“AddHelp” - If True, Function specific Help will be added to Calculations when inserting the Plug-in’s Functions.
“PopupMenuErrors” - If True, an Error Dialog will popup upon selecting a menu item that is not setup correctly.
“AutoSetValue” - If True, any menu item that does not have a value set and does not inherit a default value will use the menu item name as the value.
“DisableMenuuScaling” - If True, the menus will not scale in proportion to the current layout’s zoom factor.
“UseOldFunctions” - If True, the old-style External(“Scrp-XXX”) functions will be available.
“UseNewFunctions” - If True, the new-style CNSMenu_XXX functions will be available.

Return TypeVaries
FormatCNSMenu_Configure ( Option ; PrefName ; PrefValue )
Optional Parameters
Option

Specify the name of a Tab in the Configuration Dialog to show it opened to that tab.
Specify “Get” with the PrefName parameter to get a preference value. (If not found, and PrefValue is defined, PrefValue will be returned.)
Specify “Set” with the PrefName and PrefValue parameters to set a preference value.

PrefName

The Name of the Preference to Get or Set. (See the Function Description for a list of valid PrefNames.)

PrefValue

The Value of the Preference to Set. (See the Function Description for some possible values.)

Examples
Example 1

Opens the CNS Menu Configuration Dialog. (Because the "Option" parameter is not used, the dialog will open to the "Basics" tab.)

CNSMenu_Configure
Example 2

Opens the CNS Menu Configuration Dialog to the "About" tab.

CNSMenu_Configure( "About" )
Example 3

Returns the value of the 'Pop up Menu Errors' setting from the Configuration Dialog.

CNSMenu_Configure( "Get" ; "PopupMenuErrors" )
Example 4

Sets the 'Disable Menu Scaling' setting in the Configuration Dialog to true.

CNSMenu_Configure( "Set" ; "DisableMenuScaling" ; "True" )