Lua API: every module and type
ProjectApi
A value the API hands your plugin; call its methods to read or change it.
Where it is used
Held in
api.projectMethods
#add_object
methodapi.project:add_object(def: ObjectDefinition) → ModelElementAdds a new object to the scene using the provided definition table.
Parameters
defObjectDefinition- The configuration table for the new object.
Returns
- ModelElement
model - The newly created object.
#insert_layer_custom_gcode
methodapi.project:insert_layer_custom_gcode(
bed_inst_ref: BedInstRef,
z_depth: number,
gcode: string
)Inserts custom G-Code at a specific Z-depth.
Parameters
bed_inst_refBedInstRef- The bed instance to target.
z_depthnumber- The Z-height to insert the G-Code.
gcodestring- The G-Code string.
Returns
Nothing.
#clear_layer_custom_steps
methodapi.project:clear_layer_custom_steps(bed_inst_ref: BedInstRef)Clears all custom layer steps for the given bed instance.
Parameters
bed_inst_refBedInstRef- —
Returns
Nothing.
#current_bed
methodapi.project:current_bed() → BedInstRefRetrieves the currently active bed instance.
Returns