M.file

The M.file functions load a G-code file and tell you which file is loaded.

Applies to
MASSO G3 and MASSO G3 Touch
Available from
Software 5.13, API 1.0.0
Write scripts in
local ok = M.file.load_gcode_file(s)

Loads a G-code file.

Input: s (string): file path or name. Returns: boolean: true if loaded, otherwise false.

local p = M.file.loaded_gcode_file()

Returns the path or name of the loaded G-code file.

Input: none. Returns: string, or nil if no file is loaded.

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