Appending a DIAdem Channel Name With the File Name via Script

Updated Sep 30, 2025

Reported In

Software

  • DIAdem Professional

Issue Details

In DIAdem, I want to rename a channel named "Speed" by appending the current file name to the channel name. What is the most effective method?

Solution

You can use the following VBscript code to locate the desired channel and append its name with the file name. This script iterates through all channels in the first channel group of DIAdem’s Data Portal and will check whether the channel name is exactly "Speed". If channel name is found, it renames the channel by adding the file name to it.

Option Explicit

Dim oMyChn
For Each oMyChn In Data.Root.ChannelGroups(1).Channels
   If oMyChn.Name = "Speed" Then
       oMyChn.Properties("Name").Value = oMyChn.Name & "_" & Data.Root.Name
   End If
Next

As a result, the channel name will be updated from "Speed" to "Speed_EXAMPLE", where EXAMPLE represents the file name.

 

image