DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Find out if channel name already exists

Solved!
Go to solution

Hi, I have a script that can Integrate a channel from the data portal. The newly created channel gets the original channel name accept for the addition "_vel" when integrating an acceleration.

However, if the user already has a channel with the same name, I don't want the script to type over that channel but instead add "_2" to the channel name instead.
I have searched for a way to go through the channel names in the data portal and find out if the integrated channel name is already existing but I have not found any simple solution.

There should be a Function for this, like CnnNameExist() or similar...

Thanks in advance!

/Mikael

0 Kudos
Message 1 of 2
(833 Views)
Solution
Accepted by Mike_77

Hi Mikael,

 

the syntax you're looking for is Data.Root.ActiveChannelGroup.Channels.Exists("Channel_vel").

 

Greetings,

Vassili

Message 2 of 2
(798 Views)