Method: LoadData for Navigator
- Updated2024-09-12
- 4 minute(s) read
DIAdem NAVIGATOR > Methods > Method: LoadData for Navigator
Method: LoadData for Navigator
Loads one or more elements from the search results, the file browser, or the data browser into the Data Portal, or registers these elements in the Data Portal.
Set oElementList = Object.LoadData(ImportObject, [ImportAction], [ImportSettings])
| Object | Navigator Object with this method | ||||||||
| ImportObject | Variant Specifies which elements to load. | ||||||||
| [ImportAction] | Variant Specifies how DIAdem imports data into the Data Portal. Use the ImportParameter object for the ImportAction parameter. You can also use the following script terms as an alternative. The value range is identical to the value range in the ImportAction variable.
| ||||||||
| [ImportSettings] | Variant Specifies the Loading configuration as object. You can only use a loading configuration if you load data from data stores. NI recommends you use the loading configuration of the ImportParameter object instead of the ImportSettings parameter.
| ||||||||
| oElementList | ElementList <Data> Returned object Element list with the elements. Use the LoadReturnMode property to specify which elements the element list contains. |
Always specify the ImportSettings parameter when you use the LoadData method if the import objects are not from the opened DataFinder or data store. If you use the parameter ImportSettings and assign the ImportParameter object to the parameter ImportAction, the ImportSettings settings overwrite the loading configuration of the ImportParameter object.
If you use the ImportParameter object for the ImportAction parameter, the LoadData method supports the following properties: ImportMode, LoadReturnMode, AppendCheckGroupName, PropertyHandling.AutoUpdateChnCharacteristics (only for files), PropertyHandling.InheritanceSeparator, PropertyHandling.InheritanceMode, PropertyHandling.NamingSchema, PropertyHandling.NameMapping (only for files), PropertyHandling.ValueMappingFile (only for files), and PropertyHandling.ImportSet.
The following example loads the elements selected in the browser of a data store with the loading configuration MyPropertyImportSet into the Data Portal:
| VBScript | Python |
Dim oMyDataProvider, oMyElements, oMyPropertyImportSet Call Navigator.Display.OpenDataStore("ASAM Browse Settings Example") Set oMyDataProvider = Navigator.Display.CurrDataStore.GetDataStore Set oMyElements = Navigator.Display.CurrDataStore.Browser.SelectedElements Set oMyPropertyImportSet = Navigator.Settings.LoadPropertyImportSet("D:\MyPropertyImportSet.tdl", oMyDataProvider) Call Navigator.LoadData(oMyElements,"Load", oMyPropertyImportSet)
The following example loads the elements of a data store without an interface, which was selected with a script, with the standard loading configuration:
| VBScript | Python |
Dim oMyDataProvider, oMyElements, oMyPropertyImportSet, oMyLoadedElements Set oMyDataProvider = Navigator.ConnectDataStore("ASAM Browse Settings Example") Set oMyElements = oMyDataProvider.RootElements(1).Children(1).Children Set oMyPropertyImportSet = Navigator.Settings.CreatePropertyImportSet(oMyDataProvider) Set oMyLoadedElements = Navigator.LoadData(oMyElements, "Load", oMyPropertyImportSet)
The following example uses the loading configuration specified in the oMyImportParameter object to load the element selected in the browser of the data store into the Data Portal:
| VBScript | Python |
Dim oMyDataProvider, oMyElements, oMyImportParameter Call Navigator.Display.OpenDataStore("ASAM Browse Settings Example") Set oMyDataProvider = Navigator.Display.CurrDataStore.GetDataStore Set oMyElements = Navigator.Display.CurrDataStore.Browser.SelectedElements Set oMyImportParameter = Navigator.Settings.CreateImportParameter() oMyImportParameter.AppendCheckGroupName = eAppendCheckGroupNameAutomatic oMyImportParameter.BulkDataLoadingMode = eBulkDataLoadingOnFirstAccess oMyImportParameter.ImportMode = eLoad oMyImportParameter.PropertyHandling.AutoUpdateChnCharacteristics = True oMyImportParameter.PropertyHandling.InheritanceMode = ePropInheritanceCopyToChannelLevel Call Navigator.LoadData(oMyElements, oMyImportParameter)
See Also
Objects Overview | Elements | Element
Procedures
Configuring the Search Results | Defining Search Areas | Executing a Search with OR Operations | Executing a Text Search | Indexing Search Areas | Optimizing Custom Properties | Saving and Loading a Search Query | Searching for Data on a Different Computer in the Network | Searching for Multiple Properties | Sorting Search Results before Executing a Search
Examples
Brake Tests for Trucks | Checking DataPlugins for Timeout | Combining DataFinder Search Results | Context Menu for the Search Results of the DataFinder | Creating ATFX Files from the Context Menu of an ASAM Data Store | Customized User Interface | Evaluation Wizard for the Search Results of the DataFinder | Filtering Data with a Dialog Box | Filtering Data without a Dialog Box | Search and Evaluation Functions in User Dialog Boxes | Searching for and Evaluating Channels | Searching for Channels in the NAVIGATOR | Searching for Data Sets Marked "Failed" in Data Stores | Searching for Data Sets Marked "Failed" | Searching for Properties and Evaluating the Associated Channels | Varying Browse Settings of a Data Store