DIAdem Help

Method: Commit for DataFinderSettings

  • Updated2024-09-12
  • 3 minute(s) read

Method: Commit for DataFinderSettings

Saves the modified DataFinder configuration settings in the active configuration file. This is only possible if you assign the value FALSE to the AutoCommit property. You can use this method only on the computer on which the DataFinder is active.

Note  Use the Commit method only for the configuration of the My DataFinder DataFinder. To configure a data indexing instance in SystemLink TDM, use the SystemLink TDM HTTP API. For a description of the SystemLink TDM HTTP API, see the SystemLink Help.
Object.Commit(WaitForDataFinder)
ObjectDataFinderSettings
Object with this method
WaitForDataFinderBoolean
Specifies whether a script waits until the DataFinder configuration and the index are updated (TRUE), for example, after a large search area is deleted, or whether the script continues to execute (FALSE). If you assign the value FALSE to the WaitForDataFinder parameter, the DataFinder might not be able to respond to other queries or changes immediately.
Note  If you assign the value FALSE to the WaitForDataFinder parameter, the DataFinder symbol on the task bar displays an hourglass until all the changes are saved and the DataFinder is available.

The following example generates two new search areas. The DataFinder first writes all the modified settings to the memory. Then the DataFinder uses the Commit method to save the modified settings:

VBScriptPython

 

Dim oMyDataFinder, oMyDataFinderSettings, oMySearchAreas
Set oMyDataFinder = Navigator.ConnectDataFinder("My DataFinder")
Set oMyDataFinderSettings = oMyDataFinder.GetSettings()
oMyDataFinderSettings.AutoCommit = FALSE
Set oMySearchAreas = oMyDataFinderSettings.SearchAreas
Call oMySearchAreas.Add("MyNewSearchArea1", "C:\MyNewSearchArea1") 
Call oMySearchAreas.Add("MyNewSearchArea2", "D:\MyNewSearchArea2")
oMyDataFinderSettings.Commit(TRUE)