07-11-2019 10:31 AM
Hey,
I'm writing a data processing script that will batch process a collection of files and then archive them.
I've got a script that works for returning oMyResults from a script driven search and then I loop through the files to perform processing, but for some reason it only works when I use "Run Script" and returns an error when I use "Debug/Continue Script" this makes debugging the subsequent code I'll be developing quite annoying.
Please let me know if there is a different way to engage the navigator/search that doesn't run into this problem.
Thanks,
Alex R
07-15-2019 12:38 AM
Hello Alex R,
The query is part of the connected DataFinder. You should change your function as follows
sub LoadInQry(qry, oMyResults) Dim oMyQuery, oMyDataFinder, I,oMyElementList1, oMyResult, SearchLimit SearchLimit = 5000 Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder") If Not oMyDataFinder Is Nothing Then 'Set oMyQuery = Navigator.LoadQuery(qry) Set oMyQuery = oMyDataFinder.LoadQuery(qry) Call oMyDataFinder.SearchElements(oMyQuery, SearchLimit) Set oMyResults = oMyDataFinder.ResultsElements end if end sub
Greetings
Walter
07-15-2019 12:17 PM
Thanks for the reply Walter,
I've tried out the change you've mentioned and I still get the "invalid callee" error that I normally recieve when I use "debug/continue - script"
The function does work under a normal run command though.
I've worked around this for now, where I've avoided calling my search while debugging other portions of the code and once I'd done that I put them both together and it's been running well.
That being said it would be nice to solve the issue so I can debug more efficiently when problems do arise.
Thanks again,
Alex R
07-17-2019 06:17 AM
Hi Alex,
Which DIAdem version do you use?
Greetings
Walter
07-17-2019 08:24 AM
Hey,
I just updated my service pack yesterday but haven't had a chance to try the script since then.
After the update I'm currently using Diadem 2017 - 17.0.0f6657, USI - 17.0.0f6654, DataFinder - 17.0.0f6654
Regards,
Alex R
07-17-2019 08:25 AM
Just gave it a run since the update and the problem persists in the same way.
Call oMyDataFinder.SearchElements(oMyQuery, SearchLimit)
"invalid callee"
07-17-2019 08:30 AM
DIAdem 2017 - 17.0.0f6657 is not the latest DIAdem 2017 version.
You can find a service pack at
http://www.ni.com/de-de/support/downloads/software-products/download.diadem.html#311968
Possibly this helps.
Greetings
Walter
07-17-2019 08:39 AM
Thanks,
I'll let you know how it works out.
07-19-2019 08:09 AM
I have tried running since the service pack update.
I'm now running
DIAdem: 17.0.1f6881 service pack 1 64 bit
USI: 17.0.1f6875
DataFinder: 17.0.1f6875
This did not resolve the issue, I still get the same error.
Alex R