cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Menage channels in one group

Hallo,

I'm using the script below to manage or modify a channel according with the condition, but now I need change a large number of channels according with a condition of one channel.

dim

for a = 1 to chnlength(1)
if chd(a,1) > 20 then
chd(a,2) = nv  now, I need modify a lot of channels, like chd(a,2) until chd(a,300)
end if
next

Thanks so much

Message 1 of 8
(937 Views)

## Re: Menage channels in one group

A complete example of how to use a DIAdem Analysis Event Search to "filter" that data can be found on my website at this link: http://www.savvydiademsolutions.com/blog.php?topic=blog-filter-channel-data-by-events   Feel free to contact me if you have any further questions.

Message 2 of 8
(866 Views)
Solution
Accepted by topic author Abimael

## Re: Menage channels in one group

dim a, b

for a = 1 to chnlength(1)
if chd(a,1) > 20 then

for b = 2 To 300
chd(a,b) = nv  now, I need modify a lot of channels, like chd(a,2) until chd(a,300)

next
end if
next

Message 3 of 8
(851 Views)

## Re: Menage channels in one group

Thanks very much! Works very well.
Only one question more, how can I delete the lines selected according with the condition?

Message 4 of 8
(838 Views)

## Re: Menage channels in one group

You can call DataBlDel(channnel, startRow, #valuesToDelete)

http://zone.ni.com/reference/en-XX/help/370858N-01/comoff/databldel/

Message 5 of 8
(819 Views)

Message 6 of 8
(804 Views)

## Re: Menage channels in one group

Hallo

Sorry for my poor knowledge to scripting..I'm trying to change a channel base on a range of values from the other channel, I've tried a lot of thing, but doesn't work. Could you give me a suggestion?

dim a, b

for a = 1 to chnlength(1)
if chd(a,1) > 20 then (like between  60 until 70),

for b = 2 To 300
chd(a,b) = nv

next
end if
next

Message 7 of 8
(735 Views)

## Re: Menage channels in one group

Hallo,

I'm just got the good results with this script below

for = 1 to chnlength(2)

aux = chd(a,1)

if aux>cuti1 and aux<cutf1 then

for b = x To y

chd(a,b)= nv

chd(a,b)= chd(a,b)

next

end if

next