Grasshopper

algorithmic modeling for Rhino

Hello everybody,

I´m trying to replace certain items in a data tree. 

I know this is a simple problem in a List, but in a data tree structure I have not been able to do it so far.

Is it possible?

Views: 4882

Attachments:

Replies to This Discussion

Maybe this could be a solution, but I need to test it on several and different situations.

sorry,the file

Attachments:

Hi Leo,

quite a tricky problem. Are your branches always 3 items long and are they always numbered {0}, {1}, {2}, {3} etc.? Because if they are, you can use a trick.

ps. I just saw you already posted a similar solution yourself...

--

David Rutten

david@mcneel.com

Tirol, Austria

Attachments:

I attached a VB script component which operates on your replacement codes.

--

David Rutten

david@mcneel.com

Tirol, Austria

Attachments:

Hi David,
thank you very much for your script and the trick, very kind of you. Both works perfectly for my case.
In my definition, the number of branches and the items inside these branches, could change and not be the same List Lenght in each branch, depends on situation. This is a little part (but key part) in a much bigger definition. I´m working on it, but probably I will need to replace and insert new items in a similar way.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service