I’m trying to create a database for item instances of a certain family, so that some specific parameters would show up when I use a schedule.
Let’s say I have two instance parameters for now; Code which is a string and Color which is a material. Now I have an excel file with all the colors and their corresponding codes.
What I want to do is link each Color parameter value to its corresponding Code parameter value so that when I change one instance parameter value the other would change accordingly and I wouldn’t have to type the code manually for each different instance (color).
I attached an image to show what I have done so far.
I think the set parameter value by name nodes are the key to solve this, I need a way to somehow link those two nodes so the value in one is dependent on the other, but I could be wrong.
Would really appreciate any help.
Look into dictionaries.
Hey, I did take a look and then I tried a different configuration but I still can’t seem to get the value of one parameter to change based on the value of the other. I attached an image to clarify.
Any further help is greatly appreciated.
Can you repost this with node previews turned on? It’s nearly impossible to tell what’s going on without seeing what your individual inputs and outputs look like.
I actually got it to work finally. I have another question though, would it be possible to associate more than one value with a key?
Sort of. You can either create multiple dictionaries or use one dictionary with a list of values associated with each key. If you go with the list then you’ll just have to get each item individually when writing to the parameter. No a big deal though as you’ll control the order of the values anyway.