Bcc.Run
Bcc.Run(FileName, Arguments)
Description
This function allows for launching an executable or batch file in the file name location as well as the ability to pass arguments to the executable.
Parameters
- FileName - a valid path to a file to launch
- Arguments - a string containing all input arguments to the executable file
Examples
-- Launch the batch file passing the APT file and the workpiece STL
Bcc.Run(Bcc.GetDataFolder() .."LuaPlugins\\MyPlugin\\MyBatchFile.bat", ncFileName.." "..partFileName)
Complete Example
-------------------------------------------------------------------
-- Export the current document solids to STL and launch in Cura --
-------------------------------------------------------------------
local exeFilePath = "C:\\Program Files\\Ultimaker Cura 5.0.0\\Ultimaker-Cura.exe"
local stlPath = Bcc.GetDataFolder().."tmp.stl"
-- Export the STL file in mm
Bcc.ExportSTLFile(stlPath, nil, {ModelSource="Part", TransformMode=0, Scale=scale})
-- Launch the slicer with the file path to the STL as the first argument
Bcc.Run(exeFilePath, "\""..stlPath.."\"")