DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

create datafinder server connection

Solved!
Go to solution

Is there a way to create a datafinder server connection in script? I have a file location that needs to be typed in (you can't find it by going through folders), and want to know if there are other methods of adding server connections.

 

Thanks,

Artemis

0 Kudos
Message 1 of 5
(4,697 Views)
Hi Artemis,
Are you asking adding a search area (location DataFinder inspects for files to be indexed) programmatically?
And/Or do you want to know how to connext DIAdem or LabVIEW with the DataFinder programmatically.
Are you using DataFinder Server Edition or My DataFinder (included in DIAdem or DataFinder Toolkit)?
0 Kudos
Message 2 of 5
(4,675 Views)

I'm using My DataFinder, and was looking to add a search area. 

0 Kudos
Message 3 of 5
(4,664 Views)
Solution
Accepted by topic author Artemis125

I was able to use the following which fixed my problem,

Call Navigator.ConnectDataFinder("My DataFinder").GetSettings().SearchAreas.Add()
Call Navigator.ConnectDataFinder("My DataFinder").Indexer.IndexFolder()

But now I'm wondering if there's a way to check if  a search area already exists in the datafinder.

Message 4 of 5
(4,661 Views)

Hi Artemis,

 

See if this approach works in your DIAdem version:

 

  Set DataFinder = Navigator.Display.CurrDataFinder.GetDataFinder()
  Set Settings = DataFinder.GetSettings()
  Found = FALSE
  FOR Each SearchArea In Settings.SearchAreas
    IF LCase(SearchArea.LocalPath & "\") = LCase(sFldr_client_rw) THEN Found = TRUE
    IF LCase(Right(SearchArea.LocalPath, 20)) <> "\documents\client_rw" THEN
      Call Settings.SearchAreas.Remove(SearchArea.Name)
    END IF
  NEXT ' SearchArea

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 5 of 5
(4,639 Views)