Grasshopper

algorithmic modeling for Rhino

Why does not work operator "For Each" for list, got from DataTree (VB.NET)

Dim tree As New DataTree(Of Object)
    Dim j,i As Integer
    For j = 0 To nPaths - 1
      Dim path As New GH_Path(j)
      For i = j * (nStep + 1)  To nStep * (j + 1) + j
        tree.Add(x(i), path)
      Next
    Next
    Dim List As New List (Of Object)
    List = tree.Branch(ItemPath)
    Dim num As Object

'Why does not work  "For Each" for list?

    For Each num In List
      If num > y Then B = 0 Else B = 1
      Print(B)
    Next
    Trees = tree
    Lists = List



Views: 265

Replies to This Discussion

That should work. It's the "num > y" bit that worries me. What is the error you get?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Excuse me, I mistaken, all well work.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service