Regular API function

simModuleEntry / sim.moduleEntry

Description Creates, modifies or destroys module menu entries. Those are user selectable items located in [Menu bar --> Modules]. When selected, the corresponding script will have its sysCall_moduleEntry callback function triggered.
C/C++
synopsis
simInt simModuleEntry(simInt handle,const simChar* label,simInt state)
C/C++
parameters
handle: the handle of a module menu entry, or -1 to create one.
label: the label of the module entry. If handle is -1, then a path can be specified, in order to build sub-menus, e.g. "Menu\nSubmenu1\nSubmenu2\nLabel". Can be nullptr if handle is not -1.
state: Bit-coded: if bit0 is set (1), the item is enabled. If bit1 is set (2), the item is checked. If bit2 is set (4), the item is checkable.
Is ignored if set to -1. -2 will destroy an existing item.
C/C++
return value
-1 if operation was not successful, otherwise the handle of the module menu entry.
Lua
synopsis
int handle=sim.moduleEntry(int handle,string label=nil,int state=-1)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int handle=sim.moduleEntry(int handle,string label=None,int state=-1)