DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

SearchElements and Debug/Continue Script

Highlighted

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

 

 

 

Download All
0 Kudos
Message 1 of 9
(585 Views)
Highlighted

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

0 Kudos
Message 2 of 9
(538 Views)
Highlighted

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

0 Kudos
Message 3 of 9
(528 Views)
Highlighted

Hi Alex,

 

Which DIAdem version do you use?

 

Greetings

Walter

0 Kudos
Message 4 of 9
(514 Views)
Highlighted

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

0 Kudos
Message 5 of 9
(510 Views)
Highlighted

Just gave it a run since the update and the problem persists in the same way.

 

Call oMyDataFinder.SearchElements(oMyQuery, SearchLimit)

"invalid callee"

 

0 Kudos
Message 6 of 9
(509 Views)
Highlighted

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

0 Kudos
Message 7 of 9
(506 Views)
Highlighted

Thanks,

 

I'll let you know how it works out.

0 Kudos
Message 8 of 9
(503 Views)
Highlighted

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

0 Kudos
Message 9 of 9
(474 Views)