OnCommandUI¶
OnCommandUI is used here as a placeholder for a function that is called when a user clicks a button on the user toolbar or selects a function from a menu.
- svUI = OnCommandUI()
Return Value
svUI.
Return Value
svUI is a string vector with one or more elements from the following list:
Value |
Meaning |
---|---|
|
The menu item is enabled. |
|
The menu item is disabled. |
|
The menu item is hidden. |
|
Places a check mark next to or removes a check mark from a menu item. |
|
|
Comment
The function name is identical to the OnCommand function name plus the added UI. The function is called by the framework.
Example
The following “UI” function checks if the OnXY_Fit is loaded. If the function is not loaded the menu item will not be displayed.
def OnXY_FitUI()
{
if (!IsFunctionLoaded("OnXY_Fit")) {
return "@hide";
}
return "";
}
See also
id-1012446