DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation of an offset in all groups

Solved!
Go to solution

Hello,

 

I have 111 groups in my Diadem-project. In every group there are the same channels. Now I want to offset a certain channel in all groups. For this task I wrote a small script:

 

Dim i

For i=1 to ChnNoMax

Call ChnOffset("[1]/KonsC_2_Volumen_K2_ml[ml]","[1]/KonsC_2_Volumen_K2_ml[ml]Offset",0,"first value offset")

Next

 

Now I need a command how I can count up the channel number that the offset is done automatically for the specific channel in all groups.

 

Has somebody an advice?

 

Thank you

0 Kudos
Message 1 of 3
(1,891 Views)
Solution
Accepted by topic author GuenGuenni
Dim i, ChannelName
ChannelName = "The Specific Name of the Channel" ' maybe KonsC_2_Volumen_K2_ml[ml]
For i = 1 To Data.Root.ChannelGroups.Count Step 1
  Call ChnOffset("[" & i & "]/" & ChannelName & "","[" & i & "]/" & ChannelName & "", 0, "first value offset")
Next

Now change the specific channel name that you need

0 Kudos
Message 2 of 3
(1,845 Views)

It works very well. Thank you.

0 Kudos
Message 3 of 3
(1,829 Views)