Hi,

i have a peculiar requirement on one of my Fanuc machines. The machine supports Program restart, if by any chance there is an interruption, but i have to go to the line number (N & Number) where the program had stopped before interruption. This works if the programs has less than N9999 but most of my programs are much larger and hence the line number repeats and this is a problem.

I wanted to know if anyone out here knows any software or has a VBA piece of code which can add line numbers only at an increment of 100 lines or 1000 lines. this will solve my problem as even if i end up repeating a few lines it will not be as bad as running the whole program again or getting down to editing the program which is again a risk.

i did try using excel macro but excel does not support lines more than 69,000 and i have programs which have many more lines than these. I do know this is possible by taking a text file (NC program) and renumbering it by using excel as a front end tool through VBA macros but could not find a method to fulfill my requirement as i could not find codes to work on external files within excel.

Any help will be greatly appreciated

thanks a ton :rainfro: