Scripting Functions for Material Lots