Generic input for pulldown

Hi all,

I’m trying to give a generic input to a pulldown menu.
I have an existing C# code, which iterates over a document and retrieves valuelists. I managed to get this data and pass it to the pulldown components for Human UI. However, in both pulldowns all the options are displayed extrated from the whole gh document.
Is there any way to bind the option data read from each Valuelist to its valuelist? Such that you only have use one pulldown component for N Valuelists?

I’m not totally clear on what’s going on here. Can you explain what you’re trying to accomplish? I suspect what you want could be achieved with metahopper so you could avoid scripting.

Hi Andrew,

Sorry if i’m not to clear on what I want to achieve. I am working om somebody elses code and at the moment switched to a different project, burt i’m still currious If it could be done.

If I read a valuelist from the grashopper file using the C# script and feed the options from which to choose in the Pulldown block the pulldown functions properly. But let’s say I want to add multiple pulldowns to the model from which I read the Values things go wrong. If you cast the values to strings, and feed the data into one pulldown block, you get two pulldown menus both containing all the valuelist values corresponding to the external grasshopper document.

What I want is n pulldown menus, all with their correct “Attribute” values generated from one pulldown block in Grasshopper.

if you want to create multiple pulldowns, supply a data tree with one branch per set of options to the pulldown component. As I mentioned this is easy with Metahopper, but you could script it as well:

1 Like

Thanks!

Hallo dear Andrew,
I have the same problem, that I can solve with your solution, but I don´t find the MetaHopper´s component ObjFromGroup. Was it removed?

Thanks for your time

I see it in Rhino v7

with draw full names disabled:

image

1 Like

Hallo Inno,

Thanks, ok has change the name from “Get Object From Group”, to “Get Object In Group”

Greetings