Can you combine G-Code into one file?

I have been using VisualCAMc, and I have run into a problem with it. The work around is that I generate one g code for pockets and then another GCode for profile operations.

I opened up the file in notepad. Compared a few other gcode files. Found an online editor that will let me combine both via copy paste. I removed 3 lines of gcode because they were already at the top of the file and they just wanted the router to return to 0,0 (home)

Will this work? Or should I not do it?

It works very well. Your insight about the lines you removed is a good one. Getting comfortable messing around inside gcode files will help you understand more about the machine and how to control it.
Here are some links that I find help understanding the parts of a gcode file:

Gcode to English Translator
G-Code Quick Reference


The more I play, the more I want to know.

I found a way to manually nest some parts together. But for what ever reason it will not let me clear one little 2mm line that I selected. That’s when I discovered I could run a pocket operation. Then a profile operation. As long as my work zero is on the same piece it worked.