01-05-2007 07:34 PM
01-06-2007 01:14 AM
Hello Rodrigo!
Try this:
Option Explicit
Dim i
Call ChnGet(0,1,"Smooth Channel Select")
For i=1 To ChnSelCount(ChnNoStr1)
Call ChnSmooth( ChnSelGet(ChnNoStr1,i),"/Y_geglättet",12,"maxNumber")
Next
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
01-06-2007 07:49 AM
Hello Matthias,
Thanks a lot for your tip, but it unfortunatelly didn't work in Diadem 8.1.
Both strings "ChnSelCount" as well as "ChnSelGet" could not be identyfied by the Script editor.
I am still looking for a solution
Have a nice weekend
Rodrigo
Sao Paulo- Brazil
01-07-2007 04:19 PM
Hello Rodrigo!
Sorry! I thought the names where changed earlier and didn't tried it in 8.1.
This will work in DIAdem 8.1:
Option Explicit
Dim i
Call ChnGet(0,1,"Smooth Channel Select")
For i=1 To ChnStrCnt(ChnNoStr1)
Call ChnSmooth( ChnStrRead(ChnNoStr1,i),"/Y_geglättet",12,"maxNumber")
Next
Have a nice weekend
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
01-07-2007 07:03 PM
Hello Matthias.
Your code works this time in the 8.1 version, thanks !
However, it runs the smooth command only in the "odds" selected channels eg. 1,3,5,7,9 and skips the "even" selects channels eg. 2,4,6,8..
Also do you know any hint for the result channel overwrite the original channel name (as it is done when we call the command smoth in the taskbar) ?
I am trying to use the variable ChnSmoothIP = 1, without success so far.
Thanks a lot for your effort again !
Rodrigo
Sao Paulo - Brazil
01-08-2007 01:59 AM
Hello Rodrigo!
Yes the DIAdem channel renaming quirks are annoying. It's a little bit improved in newer versions. Try this:
Option Explicit
Dim i
Dim sgChnName
Call ChnGet(0,1,"Smooth Channel Select")
For i=1 To ChnStrCnt(ChnNoStr1)
sgChnName = ChnName(ChnStrRead(ChnNoStr1,i))
Call ChnSmooth( ChnStrRead(ChnNoStr1,i),ChnStrRead(ChnNoStr1,i),12,"maxNumber")
ChnName(ChnStrRead(ChnNoStr1,i)) = sgChnName
Next
In my test all selected channels are smoothed.
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
01-08-2007 01:59 AM
01-08-2007 02:01 AM
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
01-08-2007 06:39 AM
Hello Matthias, hello Ralf !
The code now works perfectly !!
I was almost burning my brain with it ....
Thank you very much guys.
Rodrigo
Sao Paulo - Brazil