ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

SearchElements and Debug/Continue Script

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

 

 

 

0 Kudos
Message 1 of 9
(3,342 Views)

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
(3,295 Views)

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
(3,285 Views)

Hi Alex,

 

Which DIAdem version do you use?

 

Greetings

Walter

0 Kudos
Message 4 of 9
(3,271 Views)

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
(3,267 Views)

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
(3,266 Views)

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
(3,263 Views)

Thanks,

 

I'll let you know how it works out.

0 Kudos
Message 8 of 9
(3,260 Views)

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
(3,231 Views)