Put this in your "Loadcode buttons"
You can have several buttons that load code for you this way, you push the button and it loads the G-code of the file that is in that path.
If you want to "Reuse" your buttons you could name, button 1's TAP file "Button1", button 2's file could call Button2.tap, etc.
That way with your CAD/CAM, you could write any Code Changes to those buttons directly without changing what is in your screen set.
So if you wrote part #1 as file: "Button1.TAP" when you hit button "1" it would load that part file, if later you wanted to change what "Part 1" is, (modify it, make a whole new part, whatever), you could just save, and rename your OLD Button1 (if you wanted to keep it), and then post out your CAM to a new part file called button1, save it in the same place that your old buttton1 was, and when you hit button1, it would load your new file.......................
In screen designer, make a cutom button call it, Button1, and this is the VB that goes into it.
Loadfile("C:\CNC-parts-Files\Button1.TAP")
Here is the code inside Button2
Loadfile("C:\CNC-parts-Files\Button2.TAP")
as you can see, you can have as many of these quick call buttons as you want, also you can change the code they load by overwriting the file they call with your new file calling it the same name as the old. Very versitile.
Also, IF you want to get really fancey, you can use the OpenTeachFile, OpenSubroutineFile, AppendTeachFile, and CloseTeachFile(), and LoadTeachFile() functions to customize files and subroutines............
Scott