Page 1 of 1

Load Gcode using command line

PostPosted: Tue Oct 29, 2024 4:54 pm
by RsX
Is there a way to make UCCNC load a file using a command line?
for example
Code: Select all
C:\Program Files\UCCNC\UCCNC.exe c:\myGcode.nc

Re: Load Gcode using command line

PostPosted: Wed Oct 30, 2024 3:40 am
by cncdrive
No, that's not possible, but you could load a file from a macro or from a plugin.

Re: Load Gcode using command line

PostPosted: Wed Oct 30, 2024 11:00 am
by RsX
Thanks for the reply
I followed your advise and ended up with this
macroloop.png

Code: Select all
string AutoloadFile = Environment.GetEnvironmentVariable("TEMP") + @"\UCCNC\Autoload.gcode";
//MessageBox.Show(AutoloadFile);
if(exec.CycleStopped && System.IO.File.Exists(AutoloadFile)){
   exec.Loadfile(AutoloadFile);
   while(exec.IsLoading()){}
   System.IO.File.Delete(AutoloadFile);
}