Numbers for each line in generated programs?`

Request and discuss new features
Post Reply
Spartan117

Numbers for each line in generated programs?`

Post by Spartan117 »

Hello Les,

is it possible to let sheetcam add numbers for each line in the generated
codes?

This would be helpful when searching for specific lines/commands in the gcode.

Thank you very much and best regards,

Marc
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Most posts already do this. Which post are you using?
Spartan117

Post by Spartan117 »

Oh, sorry.
I'm using the usbcnc-post-processor

Today you are really fast^^
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Go to Options->machine->post processor and click on the 'edit post' button. Add this to the end of the file:

Code: Select all

function OnNewLine()
   post.Text ("N")
   post.Number (lineNumber, "0000")
   lineNumber = lineNumber + 10
end
Now save it and close the editor. Go back to Options->machine->post processor and select 'USBCNC (edited)'

That should do the trick.
Spartan117

Post by Spartan117 »

It works, thank you very much, also for the fast reply :)
Post Reply