Regular API function

simCloseModule / sim.closeModule

Description Releases resources reserved with the sim.openModule command. This command can only be called from the main script. Call it from the main script in the last simulation pass (usually with sim.handle_all argument). sim.closeModule 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 simCloseModule.
C synopsis -
C parameters
-
C return value
-
Lua synopsis
number result=sim.closeModule(number sim.handle_all)
number result=sim.closeModule(string moduleName)
Lua parameters
sim.handle_all: indicates that all plugins should be closed
moduleName: the name of a specific plugin that should be closed
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