Regular API function

simOpenModule / sim.openModule

Description "Opens" a plugin (allowing it to reserve resources at the start of a simulation). This command can only be called from the main script. Call it from the main script in the first simulation pass (usually with sim.handle_all argument). sim.openModule is not available in the C-API. Look at the default main script to get an idea about how to use sim.openModule, sim.handleModule and sim.closeModule.
C synopsis -
C parameters
-
C return value
-
Lua synopsis
(1) number result=sim.openModule(number sim.handle_all)
(2) number result=sim.openModule(string moduleName)
Lua parameters
sim.handle_all: indicates that all plugins should be opened
moduleName: the name of the plugin that should be opened
Lua return values
result: -1 in case of an error, otherwise result is the number of plugins that executed the command.

All regular API functions on one page