Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Happy_Fly on January 30, 2009, 02:20:30 PM

Title: How to launch Mach3 and open automatically a file
Post by: Happy_Fly on January 30, 2009, 02:20:30 PM
I am searching for a Windows command line option to launch Mach3 and open and load automatically a g-code file.

I have a CAM program tha can save automatically the g-code file in the folder :

c:\mach3\gcode.iso

and then launch Mach3 with a line :

c:\mach3\mach3.exe /p smoothstepper

I am searching an option like the /p for the profile to open automatically in Mach 3 the file, something like :

c:\mach3\mach3.exe /p smoothstepper /o gcode.iso

I have search the documentation with no success someone know a trick to do this ?

Thanks in advance, ciao from Italy  8)

Mauro


Title: Re: How to launch Mach3 and open automatically a file
Post by: ger21 on January 30, 2009, 07:22:39 PM
You can put a macro in the initialization string, and in the macro, load the file.
Title: Re: How to launch Mach3 and open automatically a file
Post by: Overloaded on January 30, 2009, 08:31:13 PM
HI Gerry,
  I could use this also...would you mind to elaborate ? ?  Give an example ?
Thanks much,
RC
Title: Re: How to launch Mach3 and open automatically a file
Post by: ger21 on January 30, 2009, 09:46:08 PM
In Notepad, type the path to the g-code file, like this:

Loadfile("C:\CNC-parts-Files\Button1.TAP")

and save as a macro file, like M777.m1s

In General Config, put M777 in the initialization string.

When mach3 starts, and you click reset, the file will load.

Thanks to Scott for the Loadfile info I saved a while back. :)
Title: Re: How to launch Mach3 and open automatically a file
Post by: Overloaded on January 30, 2009, 10:01:37 PM
GREAT ! ! !
Thanks Ger,
RC
Title: Re: How to launch Mach3 and open automatically a file
Post by: Happy_Fly on February 02, 2009, 07:42:46 AM
Thanks a lot !
;-)
Mauro