Hi. I have version 6.90 of BASIC4PPC and I am making a program for Windows Desktop only (it will never be used on a device) and I am having trouble with the following error message:
"An error occurred on sub main.openncfile
Line number : 239
FileOpen(CNCFile, CurrentNCFilenameAndPath, cRead,, cASCII)
Error description :
Item has already been added. Key in dictionary :
'_main_cncfile' key being added : '_main_cncfile'
Continue ? [Yes] [No]"
This occurs when I try to re-run my program a 2nd time (it works flawlessly the first time). It is a program I have made to pre-process a CNC G-Code file
to make header for a program called Predator (from Predator-software.com) that simulates the movements the CNC machine will make from the code
my machinist students create (I teach CNC programming in a trade school in Anjou (Montreal)).
I basically open their file, extract various information, add a header to the beginning of the file and resave it with a different name. However, when I try to rerun my program a second time, it gives the above error. The reason I want to rerun my program is because the students will be doing quite a few
programs (and simulating them to get feedback on the correctness of their programming) each night.
I have tried to clear out the reference to my previously opened file by doing the following before trying to re-open a different file (or even the same one?):
odEX.New1
Dim files(0)
- but this does not fix the problem. If there is no fix for this I will just get my students to close my program and completely restart it.
Would any one know how I could fix this? I did a search on the forum for BASIC4PPC but could't find anything applicable.
I also program in BASIC4Android and have made a program for my student machinists for various things that they do. I love the look I get from my students when I tell them I make apps for Android ! (I'm 62). Keep up the good work!!!! :sign0098:
Regards
Lorne Wilkins
"An error occurred on sub main.openncfile
Line number : 239
FileOpen(CNCFile, CurrentNCFilenameAndPath, cRead,, cASCII)
Error description :
Item has already been added. Key in dictionary :
'_main_cncfile' key being added : '_main_cncfile'
Continue ? [Yes] [No]"
This occurs when I try to re-run my program a 2nd time (it works flawlessly the first time). It is a program I have made to pre-process a CNC G-Code file
to make header for a program called Predator (from Predator-software.com) that simulates the movements the CNC machine will make from the code
my machinist students create (I teach CNC programming in a trade school in Anjou (Montreal)).
I basically open their file, extract various information, add a header to the beginning of the file and resave it with a different name. However, when I try to rerun my program a second time, it gives the above error. The reason I want to rerun my program is because the students will be doing quite a few
programs (and simulating them to get feedback on the correctness of their programming) each night.
I have tried to clear out the reference to my previously opened file by doing the following before trying to re-open a different file (or even the same one?):
odEX.New1
Dim files(0)
- but this does not fix the problem. If there is no fix for this I will just get my students to close my program and completely restart it.
Would any one know how I could fix this? I did a search on the forum for BASIC4PPC but could't find anything applicable.
I also program in BASIC4Android and have made a program for my student machinists for various things that they do. I love the look I get from my students when I tell them I make apps for Android ! (I'm 62). Keep up the good work!!!! :sign0098:
Regards
Lorne Wilkins