Calling External ProgramsΒΆ
There are various ways that SIMION can call external code or programs:
- Calling external programs via os.execute() or io.popen() Lua commands. The program must support a command-line interface. There is the overhead of starting up the program, so this is typically not suitable if you need to call the code, say, a million tmes per second. SIMION Example: extension includes some examples on this.
- Calling external programs via COM (luacom). The program must support a COM interface (e.g. like Excel). The call may be in-process or out-of-process depending on the object but in either case is relatively efficient for doing that.
- Writing some code in a language like C, compiling it to a DLL, and loading that into Lua. This method can be very efficient but requires some coding. See the SIMION Example: extension example and C API (Lua 5.1 Reference Manual).
