This script solves all the objectives in the model that correspond to a single workplane
Inputs:
The workplane name -- required
A file with options -- optional
Source code:
-- PARSE INPUTS-- ============wp_name = arg1optfile = arg2-- CHECK ARGUMENTS-- ===============if wp_name ==nilthenwarn("A Workplane name is required as first input")returnendifnotworkplane_exist(wp_name) thenwarn("Workplane "..wp_name.." does not exist")returnendif arg2 ~=nilthenload_ray_trace_options(arg2) end-- All good... do the calculation-- ==============================-- Gather all the tasks in a workplanetasks =get_tasks_by_workplane(arg1)for i=1,#tasks do task_manager.add(tasks[i])end