I'm not editing g-code

The situation is that I'm making PCBs (but could be engraving - similar requirements). The width of the cut is critical and, since a v-cutter is used, the depth is also critical. We are talking 1 or 2 mil here. So, what my code (actually a wizard) will do is to firstly probe the surface of the copper to build up a 3D map. It will then load in some g-code, generated by a PCB CAD utility, and run through this fixing up the z-offsets to be relative to the 3D map it has of the PCB surface (thus negating any warping which would make the tracks be too thick/thin). The result is written to the teaching file, and then loaded and run. No manual intervention anywhere, except to specifiy the PCB file.
But... since the cutting depth is so critical the tool profile can affect things too. V-cutters don't have an infinite point, so working out the depth from the cutter angle is usually wrong. The cutters I currently use have a tip width specified at 0.2mm but the one I'm using right now is 0.17mm. Doesn't sound a lot of difference, but when the cutting depth is 0.15mm...
So, to resolve that issue I wrote a wizard that basically performs the kind of bracketing you might use for photo exposures: decide the value you want, then do some tests either side of that. My wizard takes the cutter details (angle, tip, etc) and target width, then works out the depth and generates code to cut a series of test tracks around that. For instance, if it figures the depth should be 0.15mm it might cut 5 short tracks of 0.11, 0.13, 0.15, 0.17 and 0.19. The actual cut width can then be checked and the correct depth chosen for that tool.
Trouble is that the results of the bracket test may not be correct because any warpage of the board hasn't been allowed for. So what I need is to take the code for the bracket test and feed that through the mapping wizard. I could do that by just writing to a known file, but it strikes me that sometimes the first wizard won't be one I wrote, hence I would need to be able to get to the code that's already loaded into Mach3 waiting to be run.
Hope that explains it better
