Method: LoadChannelsByName for Navigator
- Updated2024-09-12
- 4 minute(s) read
DIAdem NAVIGATOR > Methods > Method: LoadChannelsByName for Navigator
Method: LoadChannelsByName for Navigator
Loads or calculates channels from a channel group of a TDM file or a measurement of an ASAM data store into the Data Portal. If the names given in the MeasurementQuantityNameList parameter exist, DIAdem loads the respective channels. If the MeasurementQuantityNameList parameter contains the name of a channel that does not exist, the method searches for a calculation with this reference name in the loaded calculation template and executes the calculation. DIAdem saves the loaded and calculated channels in a new channel group in the Data Portal.
Set oElementList = Object.LoadChannelsByName(Measurement, MeasurementQuantityNameList, [ImportSettings])
| Object | Navigator Object with this method | ||
| Measurement | Variant Specifies the object containing the channel group or the measurement from which the method loads or calculates the channels or measured values given in the MeasurementQuantityNameList parameter. | ||
| MeasurementQuantityNameList | Variant Specifies the array with the list of names for the measurements or channels which the loading process accesses. Use the function Array to specify the list of measured values or channels or the output references of calculations, for example Array("Revs","Torque","Power"). The following cases are possible: 1) If the given measured value or the given channel exists in the measurement or in the channel group specified in the Measurement parameter, the LoadChannelsByName method loads the given measured values or channels into a new channel group of the Data Portal. 2) If the given measured value or the given channel exists in the measurement or in the channel group specified in the Measurement the Calculation Template, executes the calculation and generates the associated result channel in the new channel group of the Data Portal. If you want to calculate with DIAdem, the calculation must fulfill the following requirements:
| ||
| [ImportSettings] | Variant Specifies the Loading configuration as object. You can only use a loading configuration if you load data from data stores. If you assign the value Nothing to the ImportSettings parameter, DIAdem creates the standard browse setting for the open data store (Test/SubTest - Measurement - MeasurementQuantity), generates a minimum loading configuration, and then only transfers the name, the unit, and the description of each element into the Data Portal. If you do not assign any value to the ImportSettings parameter, DIAdem uses the loading configuration of the current data store. | ||
| oElementList | ElementList <Data> Returned object |
![]() | Note If you have selected the inheritance of properties in the DIAdem NAVIGATOR Settings dialog box, the LoadChannelsByName method always passes on the properties to the loaded channels, irrespective of the selected setting. |
The following example executes a search for channel groups and loads the channels, whose names exist in the first channel group of the search results list, into the Data Portal. The example also calculates the Calculation channel using the previously loaded calculation template. DIAdem creates a new channel group in the Data Portal with the loaded and calculated channels:
| VBScript | Python |
Dim oMyConditions, oMyQueryForm, oChnList, Channel, oChnGrp 'Creating search Set oMyQueryForm = Navigator.Display.CurrDataFinder.QueryForm Call oMyQueryForm.Clear oMyQueryForm.Mode = eAdvancedQueryForm 'Searching for channel groups oMyQueryForm.ReturnType = eSearchChannelGroup Set oMyConditions = oMyQueryForm.Conditions Call oMyConditions.Add(eSearchChannelGroup,"name","=","r*") 'Executing search Call oMyQueryForm.Search() 'First channel group of results list Set oChnGrp = Navigator.Display.CurrDataFinder.ResultsList.Elements(1) 'Loading calculation set. The calculation must have the reference output name "Calculation" Call CalculationSet.Load("MyCalculationSet.tca") Set oChnList = Navigator.LoadChannelsByName(oChnGrp, Array("Channel1","Channel2","Channel3","Calculation"))
See Also
