Command: DataFileLoad
- Updated2024-09-12
- 5 minute(s) read
Command: DataFileLoad
Command: DataFileLoad
Loads data files into the DIAdem Data Portal.
Input Parameters
DataFilename |
Specifies the name of a data file with the filename extension and the path. |
[FileImportFilter] |
Specifies which DataPlugin DIAdem uses for loading a data file into the Data Portal. |
[ImportParameterSet] |
Specifies how DIAdem imports data into the Data Portal. Use the ImportParameter object for the ImportParameterSet parameter. You can also use one of the following script terms as an alternative. If the script term contains "|ChnXYRelation", DIAdem maintains the reference to the x-channel for xy-channels. |
Return Parameters
| ReturnValue | ElementList <Data> Element list with the elements. Use the LoadReturnMode property to specify which elements the element list contains. |
| Note If you are using the ImportParameter object for the ImportParameterSet variable, the DataFileLoad command supports the following properties: ImportMode, BulkDataLoadingMode, LoadReturnMode, AppendCheckGroupName, PropertyHandling.AutoUpdateChnCharacteristics, PropertyHandling.InheritanceSeparator, PropertyHandling.InheritanceMode, PropertyHandling.NamingSchema, PropertyHandling.NameMappingFile, and PropertyHandling.ValueMappingFile. The command ignores all other properties. |
| Note The page Loading Bulk Data - General contains important information on the extended loading behavior of TDM and TDMS files. The Append Data topic describes the behavior of DIAdem when you assign the value Append to the variable ImportParameterSet or when you assign the value eAppend to the ImportParameter object of the ImportMode property. If you want to append data from many files to channels in the Data Portal, you can improve speed by transferring the filenames as a composite text instead of calling the DataFileLoad command individually for each file. Separate the individual filenames in the composite text with the "|" character. |
Examples
The following example loads the file Example.tdm and determines the mean value of all loaded channels:
| VBScript | Python |
Dim oMyElementList Set oMyElementList = DataFileLoad("Example.tdm") Call ChnAverage(oMyChannelList, "/Average")
The following example registers the Example.tdm file with the Data Portal using the TDM load method:
| VBScript | Python |
Call DataFileLoad("C:\Example.tdm","TDM","Register")
The following example loads the files File1.tdm, File2.tdm, and File3.tdm and appends channels of the same name to each other:
| VBScript | Python |
Dim MyFolder MyFolder = "D:\Test" Call DataFileLoad(MyFolder & "File1.tdm" & "|" & _ MyFolder & "File2.tdm" & "|" & _ MyFolder & "File3.tdm", "TDMS","Append")
The following example loads the external data of the Example.tdm data set with the settings made in the oMyImportParameter object into the Data Portal:
| VBScript | Python |
Dim oMyImportParameter Set oMyImportParameter = Navigator.Settings.CreateImportParameter("Load") oMyImportParameter.BulkDataLoadingMode = eBulkDataLoadingOnFirstAccess oMyImportParameter.PropertyHandling.AutoUpdateChnCharacteristics = True oMyImportParameter.PropertyHandling.InheritanceMode = ePropInheritanceCopyToChannelLevel Call DataFileLoad("Example.tdm", "TDM", oMyImportParameter)

