From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-25-2017 03:11 AM
Hello,
I got several files, that contain the same channel groups. Lets say I have two files from a flight test. So Flight1.tdm and Flight2.tdm.
Now I want to load both files into the Data Portal wo work with the data. What then happnes is, that only the channel groups are visible and channel groups will be renamed:
eg:
Flight1.tdm
- AirData
- Strain Gauges
- ...
- AirData1
- Strain Gauges1
- ...
What I need to have is something like this:
Flight1.tdm
- AirData
- Strain Gauges
- ...
Flight2.tdm
- AirData
- Strain Gauges
Is there some way to realize this or any recommanded workaround?
Thanks
Michael
08-28-2017 08:07 AM
Hello M1chael5,
to be able to specify exactly which channel should be used for a calculation or for reporting, it is necessary to have some rules for channel and group names. Within the Dataportal group names must be unique and within a channel group the channel names must be unique.
For this we automatically append a number in case one of the rules above don’t fit. But you can specify in the global DIAdem configuration a separator between the end of the name and the number.
Greetings
Walter
08-29-2017 02:12 AM
If multiple files are loaded there are different meachnisms that let you work with it.
There is always the property
sourceoriginalname
that allows you to figure out the orinal name or let you use it in Report ...
in addition the channel knows it file origins.
Have a look at the following DIAdem 2015 script loading the same file twice
Option Explicit data.Root.Clear dim filepath : filePath = ProgramDrv & "Examples\Data\Example_data.tdm" ' since diadem 2015 dim ip : Set ip = Navigator.Settings.CreateImportParameter("Load") ip.PropertyHandling.InheritanceMode = ePropInheritanceMoveToLoadedLevel ' load it twice call datafileLoad(filepath, "TDM", ip) call datafileLoad(filepath, "TDM", ip) dim exampleGroup : set exampleGroup = Data.Root.ChannelGroups(5) ' in this mode root properties are loaded to the group MsgBox exampleGroup.name & VBCRLF &_ exampleGroup.Properties("sourceoriginalname").Value & VBCRLF &_ exampleGroup.Properties("root_description").Value dim exampleChannel : set exampleChannel = exampleGroup.Channels(1) ' There are propeties to be used to figure out the original file MsgBox exampleChannel.Properties("sourcedatafilename").Value & VBCRLF &_ exampleChannel.Properties("sourcedatafilepath").Value & VBCRLF &_ exampleChannel.Properties("sourceoriginalname").Value
In DIAdem before 2015 the following script can be used
Option Explicit dim oldmode : oldmode = PropInheritanceModeDF PropInheritanceModeDF= "MoveToLoadedLevel" data.Root.Clear dim filepath : filePath = ProgramDrv & "Examples\Data\Example_data.tdm" ' load it twice call datafileLoad(filepath, "TDM") call datafileLoad(filepath, "TDM") PropInheritanceModeDF = oldmode
There is a option
Settings -> DIAdem Settings ->Navigator->Loading Behavior -> Property inheritance level
that can be used to change the mode permanently.