For those who have never written scripts or programs, there is a short lecture which presents an overview of the Script Manager.
This module introduces Lua through several simple Ecotect scripts. Lua syntax, types and function definitions are explained. The four main Lua-Ecotect commands are introduced (add, get, set, cmd).
View the exercises for lesson 1.
Examining all the zones, objects, etc. in an Ecotect model is used to motivate the looping and branching control structures in Lua.
View the exercises for lesson 2.
This module introduces the main Lua data structure, the table. Examples of using tables to store related data (e.g. all the attributes for a zone), using tables as a more flexible means of parameter passing, and using a table iterator to loop over the values in a table are presented.
View the exercises for lesson 3.
This module will cover the details of writing both named and anonymous functions, specifying parameters, including parameters with default values, and functions that return multiple values.
View the exercises for lesson 4.
Discussion of the standard Lua functions available to scripts.
An overview of the objects available to Lua scripts.
This module covers the application, model, node, object, and project objects.
This module covers the attribute, miscellaneous, schedule, script, selection, and zone objects.
This module covers the graph, grid, grid3d, masks, movie, opengl, and view objects.
This module covers the attribute, calculation, material, radiance, ray, rays, shading, sunpath, and weather objects.
In addition to local and global variables, Lua functions can reference variables from the environment in which they were created (upvalues). This module explains upvalues and why they are useful.
Common techniques for Lua scripts.