I want select any of one from the dynamo inputs but to run the script ask me select all.
or can you guide me make list of select model elements. I want make list Demo, New, Old and once I select the Demo the demo node will run. Is it possible.
I don’t quite understand what you’re asking. Are you wanting to select Demo, Existing, Hold, or New? Or are you wanting each of those selections to be for multiple elements instead of one?
There’s a Select Model Elements
node that allows multiple elements to be selected. If you want to choose which phase to use, then you need to create a selection for those options. The Custom Selection
node will allow you to do that and then you’ll just index where you want your selection to go.
I want one selection where I can select demo or hold or existing and run the script the custom node i have in that I kept input as select model elements node. Custom selection works as string, i want something as variable
The “selection” will always be a string because it has to be user-readable. The idea with the custom selection node is that your keys (user-readable strings) correspond with a value (typically an index) that allows you to build a list of whatever you want to be selected by index. You’re really just choosing which index to pull from your list.
Your case has an additional consideration since your “selection” isn’t really a selection of an object, but a piece of code you want to execute. There are tons of discussions about how this works in Dynamo and why it’s generally not a good idea to handle your code this way. If you’re doing this with custom nodes however, you can just wrap everything into one custom node and control your data flow in the node itself.
If you don’t want to do that, then you have to pass a null or empty list to the other nodes that aren’t selected and deal with any potential warnings that arise.