Solves the task manager
Parameters
This function receives no parameters
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
solve_task_manager()
{% endtab %} {% endtabs %}
Prints the current task flow to the standard output
Parameters
This function receives no parameters
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
print_task_flow()
{% endtab %} {% endtabs %}
Removes all tasks from the Task Manager
Parameters
This function receives no parameters
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
purge_tasks()
{% endtab %} {% endtabs %}
Prints a warning to the standard error, but continues processing the script
Parameters
Name | Parameter | Required |
---|---|---|
message | The message to warn | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
warn(message)
{% endtab %} {% endtabs %}
Transforms a certain value into a detailed string. This works very simply for strings and numbers. Tables are transformed into JSON. However, Lua tables are more flexible than JSON objects... so take care of that.
Parameters
Name | Parameter | Required |
---|---|---|
value | The value to print | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
r = inspect("car")
print( r )
--[[
this should print:
"car"
]]
{% endtab %}
{% tab title="Example 2" %}
r = inspect(1)
print( r )
--[[
this should print:
1
]]
{% endtab %}
{% tab title="Example 3" %}
r = inspect({1,2,3})
print( r )
--[[
this should print:
[
1.0,
2.0,
3.0
]
]]
{% endtab %}
{% tab title="Example 4" %}
r = inspect({
a = 1; b = 2; c = 3;
})
print( r )
--[[
this should print:
{
"a": 1.0,
"b": 2.0,
"c": 3.0
}
]]
{% endtab %} {% endtabs %}
Retrieves an array with the workplanes names in the model
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
workplanes | An array with the workplanes names |
{% tabs %} {% tab title="Example 1" %}
workplanes = get_workplanes_list()
{% endtab %} {% endtabs %}
Retrieves a table with the workplane information in the model. That is, name, maximum size of pixel (triangulation), tasks, etc.
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
workplanes | An array with the workplanes names |
{% tabs %} {% tab title="Example 1" %}
workplanes = get_workplanes_data()
{% endtab %} {% endtabs %}
Checks if a workplane does exists in the model
Parameters
Name | Parameter | Required |
---|---|---|
workplane_name | The name of the workplane | TRUE |
Returns
Return | Description |
---|---|
exist | True or False |
{% tabs %} {% tab title="Example 1" %}
exist = is_workplane(workplane_name)
{% endtab %} {% endtabs %}
Counts the number of polygons in a workplane
Parameters
Name | Parameter | Required |
---|---|---|
workplane_name | The name of the workplane | TRUE |
Returns
Return | Description |
---|---|
n_polygons | The number of polygons |
{% tabs %} {% tab title="Example 1" %}
n_polygons = count_workplane_polygons(workplane_name)
{% endtab %} {% endtabs %}
Creates a new Workplane
Parameters
Name | Parameter | Required |
---|---|---|
workplane_name | The name of the workplane | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane(workplane_name)
{% endtab %} {% endtabs %}
Retrieves an array with the metrics
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
metrics | The metrics |
{% tabs %} {% tab title="Example 1" %}
metrics = get_metrics()
{% endtab %} {% endtabs %}
Retrieves a single metric
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the metric to retrieve | TRUE |
Returns
Return | Description |
---|---|
a_metric | The metric |
{% tabs %} {% tab title="Example 1" %}
a_metric = get_metric(name)
{% endtab %} {% endtabs %}
Retrieves an array with the layer names in the model
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
layer_names | An array with the layer names |
{% tabs %} {% tab title="Example 1" %}
layer_names = get_layers_list()
{% endtab %} {% endtabs %}
Checks if a layer does exist in the model
Parameters
Name | Parameter | Required |
---|---|---|
layer_name | The name of the workplane | TRUE |
Returns
Return | Description |
---|---|
exist | True or False |
{% tabs %} {% tab title="Example 1" %}
exist = is_layer(layer_name)
{% endtab %} {% endtabs %}
Counts the number of objects in a layer
Parameters
Name | Parameter | Required |
---|---|---|
layer_name | The name of the layer | TRUE |
Returns
Return | Description |
---|---|
count | The number of objects |
{% tabs %} {% tab title="Example 1" %}
count = count_layer_objects(layer_name)
{% endtab %} {% endtabs %}
Counts the number of ComponentInstances in a layer
Parameters
Name | Parameter | Required |
---|---|---|
layer_name | The name of the layer | TRUE |
Returns
Return | Description |
---|---|
count | The number of ComponentInstances |
{% tabs %} {% tab title="Example 1" %}
count = count_layer_instances(layer_name)
{% endtab %} {% endtabs %}
Retrieves an array with the ComponentDefinition names in the model
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
definitions | An array with the ComponentDefinition names |
{% tabs %} {% tab title="Example 1" %}
definitions = get_component_definitions_list()
{% endtab %} {% endtabs %}
Checks if a ComponentDefinition does exist in the model
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the ComponentDefinition | TRUE |
Returns
Return | Description |
---|---|
exist | True or False |
{% tabs %} {% tab title="Example 1" %}
exist = is_component_definition(name)
{% endtab %} {% endtabs %}
Adds a Component Definition to the model
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the ComponentDefinition | TRUE |
Returns
Return | Description |
---|---|
a_component | The name of the component definition |
{% tabs %} {% tab title="Example 1" %}
a_component = component(name)
{% endtab %} {% endtabs %}
Counts the number of objects in a ComponentDefinition
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the ComponentDefinition | TRUE |
Returns
Return | Description |
---|---|
count | The number of objects |
{% tabs %} {% tab title="Example 1" %}
count = count_component_definition_objects(name)
{% endtab %} {% endtabs %}
Counts the number of ComponentInstances in a ComponentDefinition
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the ComponentDefinition | TRUE |
Returns
Return | Description |
---|---|
count | The number of ComponentInstances |
{% tabs %} {% tab title="Example 1" %}
count = count_component_definition_instances(name)
{% endtab %} {% endtabs %}
Retrieves a table with the location of the model, containing: latitude, longitude, time_zone, city, country, albedo and elevation fields.
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
location | A table with the location data |
{% tabs %} {% tab title="Example 1" %}
location = get_location_data()
{% endtab %} {% endtabs %}
Retrieves a list of all the material names in the model
Parameters
This function receives no parameters
Returns
Return | Description |
---|---|
materials | A list with all the names of the materials |
{% tabs %} {% tab title="Example 1" %}
materials = get_materials_list()
{% endtab %} {% endtabs %}
Checks if a material exists in the model
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the material | TRUE |
Returns
Return | Description |
---|---|
is_material | A list with all the names of the materials |
{% tabs %} {% tab title="Example 1" %}
is_material = is_material(name)
{% endtab %} {% endtabs %}
Gets the class of a certain material
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the material | TRUE |
Returns
Return | Description |
---|---|
mat_class | A list with all the names of the materials |
{% tabs %} {% tab title="Example 1" %}
mat_class = get_material_class(name)
{% endtab %} {% endtabs %}
Checks if an object exists in the model
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the object | TRUE |
Returns
Return | Description |
---|---|
is_object | Is it? |
{% tabs %} {% tab title="Example 1" %}
is_object = is_object(name)
{% endtab %} {% endtabs %}
Gets the class of a certain object
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the material | TRUE |
Returns
Return | Description |
---|---|
obj_class | A list with all the names of the materials |
{% tabs %} {% tab title="Example 1" %}
obj_class = get_object_class(name)
{% endtab %} {% endtabs %}
Adds a new Layer object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
name | The name of the layer | TRUE |
Returns
Return | Description |
---|---|
layer | The name of the created layer |
{% tabs %} {% tab title="Example 1" %}
layer = layer(name)
{% endtab %} {% endtabs %}
Adds a new Bubble object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_bubble | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_bubble = bubble(data)
{% endtab %} {% endtabs %}
Adds a new Cone object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_cone | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_cone = cone(data)
{% endtab %} {% endtabs %}
Adds a new Cup object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_cup | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_cup = cup(data)
{% endtab %} {% endtabs %}
Adds a new Cylinder object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_cylinder | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_cylinder = cylinder(data)
{% endtab %} {% endtabs %}
Adds a new Polygon object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_polygon | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_polygon = polygon(data)
{% endtab %} {% endtabs %}
Adds a new Ring object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_ring | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_ring = ring(data)
{% endtab %} {% endtabs %}
Adds a new Source object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_source | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_source = source(data)
{% endtab %} {% endtabs %}
Adds a new Sphere object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_sphere | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_sphere = sphere(data)
{% endtab %} {% endtabs %}
Adds a new Tube object to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_tube | A table with the object information at time of creation |
{% tabs %} {% tab title="Example 1" %}
a_tube = tube(data)
{% endtab %} {% endtabs %}
Adds a new Dielectric material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_dielectric | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_dielectric = dielectric(data)
{% endtab %} {% endtabs %}
Adds a new Glass material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_glass | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_glass = glass(data)
{% endtab %} {% endtabs %}
Adds a new Glow material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_glow | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_glow = glow(data)
{% endtab %} {% endtabs %}
Adds a new Interface material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
an_interface | The name of the material |
{% tabs %} {% tab title="Example 1" %}
an_interface = interface(data)
{% endtab %} {% endtabs %}
Adds a new Light material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_light | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_light = light(data)
{% endtab %} {% endtabs %}
Adds a new Metal material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_metal | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_metal = metal(data)
{% endtab %} {% endtabs %}
Adds a new Plastic material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_plastic | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_plastic = plastic(data)
{% endtab %} {% endtabs %}
Adds a new Spotlight material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_spotlight | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_spotlight = spotlight(data)
{% endtab %} {% endtabs %}
Adds a new Trans material to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
a_trans | The name of the material |
{% tabs %} {% tab title="Example 1" %}
a_trans = trans(data)
{% endtab %} {% endtabs %}
Adds a new View to the EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
view | The name of the view |
{% tabs %} {% tab title="Example 1" %}
view = view(data)
{% endtab %} {% endtabs %}
Returns a list of the views' names
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
views | An array with the names of the views in the model |
{% tabs %} {% tab title="Example 1" %}
views = get_views_list(data)
{% endtab %} {% endtabs %}
Returns a list of the views' names
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
Return | Description |
---|---|
is_a_view | Does the view exist in the model? |
{% tabs %} {% tab title="Example 1" %}
is_a_view = is_view(data)
{% endtab %} {% endtabs %}
Returns a list of the views' names
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
box(data)
{% endtab %} {% endtabs %}
Creates a new ComponentInstancex
Parameters
Name | Parameter | Required |
---|---|---|
data | The table with the data | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
instance(data)
{% endtab %} {% endtabs %}
Modifies the ray-tracing options in the current EmpModel
Parameters
Name | Parameter | Required |
---|---|---|
options | A Table with the ray-tracing options to set | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
ray_trace_options(options)
{% endtab %} {% endtabs %}
Prints the current ray-trace opcions. If a file is given, the options will be printed to such file. If not, the options will be printed to the Standard Output.
Parameters
Name | Parameter | Required |
---|---|---|
file | The name of the file to write | FALSE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
print_ray_trace_options(file)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_scene_file(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_model_info(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_rif_file(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_components(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_views(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_current_sky(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_current_weather(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_materials(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_layers(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_photosensors(task_name, options)
{% endtab %} {% endtabs %}
Adds a task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
write_workplane(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Workplane Illuminance task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_illuminance(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Workplane Daylight Factor task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_df(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Workplane Useful Daylight Illuminance task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_udi(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Workplane Daylight Autonomy task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_da(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Workplane Annual Sunlight Exposure task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_ase(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Annual Solar Irradiation task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_solar_irradiation(task_name, options)
{% endtab %} {% endtabs %}
Pushes a Calculate Annual Daylight Exposure task to the task manager
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
workplane_daylight_exposure(task_name, options)
{% endtab %} {% endtabs %}
Pushes a generic Workplane metric to the Task Manager. This is an alternative method to workplane_ase, workplane_da, etc.
Parameters
Name | Parameter | Required |
---|---|---|
task_name | The name of the task to add | TRUE |
options | The options given | TRUE |
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
push_metric(task_name, options)
{% endtab %} {% endtabs %}
Calls RVU program
Parameters
This function receives no parameters
Returns
This function returns nothing
{% tabs %} {% tab title="Example 1" %}
review()
{% endtab %} {% endtabs %}