Some tips that might help you:
in the directory C:\Program Files (x86)\Planit\Edgecam 2011 R1\Language you can find cgcomp.chm. itīs the help file for the compiler and contains syntax for many things.
after you compile your post you will get an intermediate .mxt file in
this contains all the output from code wizzard.
donīt edit this file, but steal syntax and read about why things happend.
loads info about tools (i did not do any full scale testing of this)
Iīm not sure that your approach is the best anyway. Move to toolchange will probably always give you next tool although you are not about to change tools yet.
try outputing nexttool as a comment and se if it is unchanged when you just use this as a "move away"
Another way of getting what you want is to declare your own M function
Give it a good name (it will pop up in the sequence tree) and then add different options, give it a fake M number that is not common to other functions
then under construct you can put your own code with if statments to check what options you used and output different codes including a comment with instruction like "change inserts" " meassure" and so on. i think this approach would give your programs better documentation at the same time.