06-17-2015 08:02 AM
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
Solved! Go to Solution.
06-18-2015 03:13 AM
06-18-2015 08:00 AM
I'm using My DataFinder, and was looking to add a search area.
06-18-2015 08:18 AM - edited 06-18-2015 08:19 AM
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.
06-19-2015 06:53 AM
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