Introduction to Scripting and the API

The scripting language that has been integrated with CADFEKO and POSTFEKO is called Lua. Lua has a syntax that is similar to Python and Matlab (or Octave) and is easy to learn and use.

The scripting interface, or application programming interface (API), also allow you to control CADFEKO and POSTFEKO from an external script. This interface is similar to Visual Basic for Applications (VBA). Editing scripts is easy with the integrated script editor that includes many development tools such a break points and the ability to pause an executing script.

There are many Lua modules available on the internet that can be installed and integrated into Feko. By using the LuaCOM Lua module it is possible to control applications such as Excel and Word using the component object model (COM) interface. There are also many modules for performing calculations on results or reading (or writing) data from (or to) files in CSV or XML format (using LuaExpat).

It is recommended that you familiarise yourself with basic scripting before starting with a new scripting project. There are a number of useful demonstrations to reduce development time.