PDA

View Full Version : Handle Text File Operation oddness



JerryS@cat
04-25-2018, 02:59 PM
Has anyone noticed that when using the Script command, Handle Text File Operation", you seem to be limited to using one file at a time. I've tried running a DO LOOP where each iteration through the loop (Get Item) a record from a text file and then uses some data from that record to search through (Find Item) the entire contents of another text file for a possible match. Next iteration of the (Find Item) on the first file seems to be unable to go past the first record. I'm guessing file handles are being confused in the background?

Can send a simple code example to illustrate if necessary.


Jerry Shannon
Caterpillar, Inc.

linder
04-26-2018, 05:44 AM
Hi Jerry,

good point. I think that your are indeed limited to using one file at a time. This is sub-optimal. I'll check this.

Friedrich

JerryS@cat
04-26-2018, 07:08 PM
Friedrich,

That is disappointing that there is a restriction of "1" file that can be used at a time, especially since I could find no mention of it in any of the documentation. I guess there's no choice at this point other than to call some external routine when conditions become necessary to process more than 1 file at a time.

linder
04-27-2018, 03:55 AM
Jerry,

Yes, I agree 100%. There is no mention of it in the documentation :( and the original function design was (from the very beginning) single-file based only.

We will see what we can do here and I'll get back to you.

Friedrich

JerryS@cat
06-01-2018, 10:54 AM
Friedrich:

It's been over a month. Just wondering how long I should wait to hear back from you, or if I should just assume nothing is going to change in regard to the way this command was designed.

linder
06-01-2018, 02:06 PM
Jerry,

this is definitely not a trivial change and I can guarantee that we are working hard on it. But it requires a complete rewrite of quite a few main functions in the runtime.

Yes, it would be easy to just change the documentation, but I would prefer a modified feature design.

Friedrich

linder
06-02-2018, 05:54 AM
Jerry,

could you please send your code example (including text files) to support@lindersoft.com so we can test it here with our latest internal build? We have optimized the SetupBuilder runtime in quite a few areas (and I think your multiple-file scenario should work now).

Friedrich

linder
06-21-2018, 04:16 AM
Thanks so much for sending the project and test files!

Friedrich

linder
09-02-2018, 11:37 AM
Hi Jerry,

the "Handle Text File Operation" script function supports multiple text files in our internal SetupBuilder 2018 now. We'll make a beta version available very soon. If it is okay with you, then I will send you the compiled "Multiple_File_Test.exe" to test it with your "User_Software_Request.txt" and "Approved_Software.txt" demo files.

Friedrich

JerryS@cat
09-05-2018, 01:47 PM
Friedrich:

Yeah, sorry about that but google won't allow an email that has an attached .exe file and neither will my employer, so you won't be able to email it to me. The firewall rules are such that even if you zip the file or rename it to some other file extension, they still know it's an executable file and won't allow it through.

linder
09-07-2018, 09:30 AM
Hi Jerry,

if you are interested, a first SetupBuilder 2018 pre-release is available:

http://www.lindersoft.com/forums/showthread.php?47846-SetupBuilder-2018-Build-5995-for-Clarion-11-3rd-party-developers

You can then compile your project to test the new multiple-file enhancement.

Friedrich