Please see chapter "Material Functions" : bim:get-all-usedmaterials