DIAdem Help

Command: DataFileLoadSel

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

Display all  Hide all

Command: DataFileLoadSel

Loads selected channels from a data file into the DIAdem Data Portal.

Set ReturnValue = DataFileLoadSel(DataFilename, FileImportFilter, ImportSelection, [ImportParameterSet])

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.
ImportSelection Specifies which data channels to load from a data file.
[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 DataFileLoadSel 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 DataFileLoadSel command individually for each file. Separate the individual filenames in the composite text with the "|" character.

Examples

The following example loads the channels with the indexes 2 and 3 from the first group of the C:\Example.tdm file into the Data Portal. The example appends the new channels to the last channel of the default group of the data store in the Data Portal. The example then determines the mean value of all loaded channels:

VBScriptPython

 

Dim oMyElementList
Set oMyElementList = DataFileLoadSel("C:\Example.tdm",,"[1]/[2,3]")
Call ChnAverage(oMyElementList, "/Average")

The following example uses the TDM loader to register the channels with the indexes 2 and 3 from the first group of the C:\Example.tdm file in the Data Portal. The example appends the new channels to the last channel of the default group of the data store in the Data Portal.

VBScriptPython

 

Call DataFileLoadSel("C:\Example.tdm","TDM","[1]/[2,3]","Register")

The following example loads the second channel of the first, the second, and the third channel group into the Data Portal.

VBScriptPython

 

Call DataFileLoadSel(ProgramDrv & "Examples\Data\Report_expl.tdm",,"[1]/[2]|[2]/[2]|[3]/[2]")

The following example loads the second and third channel of the first channel group of the data set Example.tdm with the settings made in the oMyImportParameter object in the Data Portal:

VBScriptPython

 

Dim oMyImportParameter
Set oMyImportParameter = Navigator.Settings.CreateImportParameter("Load")
oMyImportParameter.BulkDataLoadingMode = eBulkDataLoadingOnFirstAccess
oMyImportParameter.PropertyHandling.AutoUpdateChnCharacteristics = True
oMyImportParameter.PropertyHandling.InheritanceMode = ePropInheritanceCopyToChannelLevel
Call DataFileLoadSel("Example.tdm",, "[1]/[2,3]", oMyImportParameter)

Related Topics

Command: ChnValExpand | Command: DataFileLoad | Command: DataFileLoadRed | Command: DataFileSave | Command: DataFileSaveSel | Command: DataFileSelDlg | Command: FileDlgShow | Command: FileNameGet | Command: PathDlgShow | Commands and Variables for Working with Data | Variable: FileExportFilter | Variable: FileFilter | Variable: FileImportFilter

Log in to get a better experience