algorithmic modeling for Rhino
Hi Guys,
I am creating a VB script, and I have a small issue. I am creating more than 60 inputs, all of them are 3d point type. I am looking for a way to create a list out of those 3d points, but with me needing to address each name in the code. (names are really long). Is there a way to do that?
Tags:
Petar, you should post a rough outline or example of the code you want and describe the bigger goal that you are trying to acheive.
It's hard to understand what you need from your short description.
It is quite simple what I am trying to do. I have a bunch of districts, each one of them with a dominant building in it - each one represented with a point. I want to have each point as a individual input, and as an output one list made out of all of this points, sorted the way they are sorted in input (alphabetically). Than, I will copy that vb script, change inputs to let's say integer and create inputs for square meter area of each district. That way I could add as many vb scripts with different values, and at the end I could do all kind of calculations, by simply extracting same list item out of every vb script. I hope this is clear.
Thank you for your kind reply
yes, I can, But, I was hoping to learn how to do it in VB (I am quite new to VB), and also, I would produce more than 10 of this groups, where each one will have different parameters (area, point, curve, slope), so my idea was just to copy VB script and change type hint.
Well, if you must do it in a VB component, you can do it like in the screenshot below. Note that by leaving the inputs as data-type "object" (which is the parent of all data types), you don't have to individually right-click each component(EDIT) input and set its data-type.
However, the merge component serves the exact same purpose, in fact, in a better way, because the line I wrote
input.VolatileData.Branch(0).Item(0)
makes the VB component to work only for single item inputs (which works for your task at hand). Sorry, I am a bit busy at the moment to generalize the solution.
Aside from that, I don't know if having components with more than 60 inputs is the best option. I feel there might be a better solution for this, though I have not been able to think of one myself :)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by