Hey David,
hey Everyone,

I tried to sort data with you new trees component, but it seems to be
a tough nut to crack for me.
the logic is very simple I put the list of duobles in, and compare it
with input of doubles
if the element the same I put a new parameter in.
But it didn't work:(
could you help me?

Best!
Dima

Sub RunScript(ByVal arrRad As List(Of Double), ByVal factor_green As
Double, ByVal factor_magenta As Double, ByVal factor_blue As Double,
ByVal factor_black As Double, ByVal radi_green As Double, ByVal
radi_magenta As Double, ByVal radi_blue As Double, ByVal radi_black As
Double, ByVal radi_red As Double, ByVal factor_red As Double)

    Dim tree As New DataTree(Of Double)

    Dim arrNewRadi As New List(Of Double)

    For i As Int32 = 0 To arrRad.Count - 1

      Dim path As New EH_Path(i)

      If (arrRad(i) = radi_green) Then  tree.Add(factor_green, path)
      If (arrRad(i) = radi_green) Then  arrNewRadi.Add(factor_green)

      If (arrRad(i) = radi_red) Then  tree.Add(factor_red, path)
      If (arrRad(i) = radi_red) Then  arrNewRadi.Add(factor_red)

      If (arrRad(i) = radi_black) Then  tree.Add(factor_black, path)
      If (arrRad(i) = radi_black) Then  arrNewRadi.Add(factor_black)

      If (arrRad(i) = radi_blue) Then  tree.Add(factor_blue, path)
      If (arrRad(i) = radi_blue) Then  arrNewRadi.Add(factor_blue)

      If (arrRad(i) = radi_magenta) Then  tree.Add(factor_magenta,
path)
      If (arrRad(i) = radi_magenta) Then  arrNewRadi.Add
(factor_magenta)

      'tree.Add(radi_temp, path)
      'arrNewRadi.Add(radi_temp)
    Next

    A = tree
    B = arrNewRadi
  End Sub

Reply via email to