tool list at start of gcode

Is there any way to comment a list of tools used in the code at the beginning of the code? Something that would look like this?

;T01= (1/2in EndMill HSS 4FL 1 LOC)
;T02= (1/8in EndMill HSS 4FL 1/2 LOC)
;T03= (1/8in Rad HSS CORNER ROUND)

The semicolon is the comment character recognized by the control.

I am now trying to adapt sheetcam for use with our mills and am trying to match the same format we are used to.

In case anyone else ever has this question, i found a way to do it. Add a function to the post:

function OnFileClosed()
	path = filePath.. "/" .. fileName
	fileContent = {}
	for i=1,ind do
		table.insert (fileContent, i, toolTable[i])
	file =, "r")
	for line in file:lines() do
		table.insert (fileContent, line)
	file =, "w")
	for index, value in ipairs(fileContent) do

And add this in the tool change function

   toolTable[ind] = ";T" .. tool .. "= (" .. toolName .. ")"
   ind = ind + 1

That will work but don’t forget to clear your toolTable array in function OnInit(). All globals are remembered between post processor runs.
I’d suggest using a string rather than a table. It will use less memory and is simpler. For example to read the contents of the file into a string:
local content = file:read(“*all”)

Either way you may run into memory limits for very big jobs. I don’t know what the limits are but in all probability you would have to try pretty hard to hit the limit.

Sorry, i probably should have put that in there too. I also added this to OnInit():

   ind = 1
   toolTable = {"none"}

That is good to know, thank you for the tips! I just already knew how to work with tables, im pretty foggy on string manipulation. And i already had a post processor from the waterjet that read the file into a table.