M.file

M.file.load_gcode_file(s)

 

Description: Loads a G-code file. Returns true if successful, else false.

Syntax: local ok = M.file.load_gcode_file(s)

Input: s (string — path/name)
Returns: boolean 

Supported in MASSO software v5.13 & API Version: 1.0.0

 

 

M.file.loaded_gcode_file()

 

Description: Returns the currently loaded G-code file path/name, or nil if none.

Syntax: local p = M.file.loaded_gcode_file()

Input: (none)
Returns: string | nil  

Supported in MASSO software v5.13 & API Version: 1.0.0

Example:

local f = M.file.loaded_gcode_file()
print("Loaded file:", f or "(none)")