[De...] Posted February 26 Share Posted February 26 Hi there it will be an interesting discussion I have got point data file to generate a circel by using --> Recall featurepoints --> from file and I want to recall 1000 files ( will be extended to 10.000 amount later ) one by one and report will be recording the x,y,z and diameter values in a text file. It could be an alternative to use LOOP and repeat of measurements but every calculation is taking around 1 second and with those amount of files we dont have such time to wait. So is there a way possible like below? source files named like , sample1.txt sample2.txt ... sample1000.txt generate a file named like sample.txt copy content of sample1.txt to sample.txt 1 - recall fetaure points from sample.txt 2 - calculate characteristics and write them in a file 3 - delete actuals 4 - delete sample.txt 5 - copy sample2.txt to sample txt 6 - recall fetaure points from sample.txt and all would be better to done in "do-while" loop or "for - next " Thanks Devrim Link to comment Share on other sites More sharing options...
[Ri...] Posted February 27 Share Posted February 27 This just sounds painful either way, and I don't see how 1,000 or 10,000 individual files being processed would ever be remotely efficient. I guess the bigger question is why? Link to comment Share on other sites More sharing options...
[Ma...] Posted February 27 Share Posted February 27 Wouldn't be easier - if it can be done - use PCM to create circle feature and load actuals. Then when they are all loaded, then make report? Even if you save those actuals into zpm and reevaluate from them would take more than second per one file. Link to comment Share on other sites More sharing options...
[De...] Posted February 28 Author Share Posted February 28 Please sign in to view this quote. this sounds interesting do you mean AddME() or anything else which I dont know ? Link to comment Share on other sites More sharing options...
[Ma...] Posted February 28 Share Posted February 28 Please sign in to view this username. sorry, PCM is unknown for me. Perhaps someone who knows will guide you if it can be done with this way. Please sign in to view this username. Please sign in to view this username. Please sign in to view this username. Please sign in to view this username. Link to comment Share on other sites More sharing options...
[na...] Posted March 3 Share Posted March 3 Please sign in to view this quote. Sorry, I don't know this, but I'm interested in learning how to. Dane Link to comment Share on other sites More sharing options...
[De...] Posted March 3 Author Share Posted March 3 Hi I think I have got something - there is one file to be recalled by circle in every Loop and then new file content replaced with this file - after every calculation actuals will be deleted //this was necessary otherwise Calypso is not trying to load the file if actuals are exist in the geometry - recalled file deleted and the file which +1 named is replaced with the recalled file in every loop counts presetting time_start = millisecondClockValue() //for to check the calculation time when there are multiple files to load in Cricle fileToBeRead_Circle1 = "C:\Users\Administrator\Desktop\Projects\my project\03 samples\Circle1 samples\sample Circle1.txt" Filename_Circle1 = "C:\Users\Administrator\Desktop\Projects\my project\03 samples\Circle1 samples\Circle1 sample "+LOOP1+".txt" --------------------------------- postsetting X_c1 = getActual("X Value_Circle1").actual Y_c1 = getActual("Y Value_Circle1").actual Z_c1 = getActual("Z Value_Circle1").actual D_c1 = getActual("Diameter_Circle1").actual getNominal("Circle1").measElement.deleteMyActuals time_end = millisecondClockValue() calc_time = time_end - time_start textToWrite_c1 = "D_c1 = " + text(D_c1)+" , "+"X_c1 = " + text(X_c1)+" , "+ "Y_c1 = " + text(Y_c1)+" , "+"Z_c1 = " + text(Z_c1)+" , " +"Calculation time = " + text(calc_time)+"msec " addToFile("C:\Users\Administrator\Desktop\Projects\my project\03 samples\Report_Cicle1.txt", textToWrite_c1 ) deleteFile(fileToBeRead_Circle1) renameFile(Filename_Circle1, fileToBeRead_Circle1) how it looks ? Link to comment Share on other sites More sharing options...
[Ma...] Posted March 3 Share Posted March 3 I think its ok 👌 What time it takes for 10 records? Link to comment Share on other sites More sharing options...
[De...] Posted March 3 Author Share Posted March 3 averagely 450msec for every recall Link to comment Share on other sites More sharing options...
[Ma...] Posted March 3 Share Posted March 3 So approx - 75minutes for 10k Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in