Civil3D - Prompt User To Select Objects

I have created a button for my Dynamo script following the instructions here:

My script requests user input as its first node to select items within the model. I would like for my script to request user input selection every time the script is run, without needing to open Dynamo and select the “Change” button shown here on this node.

I have right-clicked the input and changed it to “As Input” but it still runs using old user input without asking for new user input.

Is it possible to ask for user input every time without pressing “Change” on the node and without opening the dynamo visual programming interface? Any help is appreciated. Thanks

Look into the Datashapes package, in particular the UI++ nodes. UI.MultipleInputForm ++ – data|shapes

Thank You, Jacob. I’ll check this out

I feel like I didn’t do a good job explaining my problem in the initial post. All I want is for this Select Objects node to “refresh” every time the Dynamo script is run (without needing to press the “Change” button). Or in other words, I want the command prompt to ask the user for input every time the script is run, like the image here shows:

Did you try the UI++ nodes? I am not sure if they have a C3D selection node or not, but that’s where I’d start.

You could also swap out the input for one with nothing selected, save the graph, and execute it only via Dynamo Player.

I don’t think this is going to be possible given the way those UI selection nodes work. You’ll notice that they don’t actually require the graph to be run in order to return an output (i.e. it still works when the graph is set to Manual instead of Automatic). There might be some way to capture an event that fires when a run is complete and then reset the node upon hearing that event, but now we’re talking about a change in the fundamental way that the node is designed and how the results are cached.

You could abandon this node and try a Python approach, but you’d need to make sure that you convert the native AutoCAD/Civil 3D object types into their corresponding Dynamo types. It would also probably require some type of toggle that would have to be changed by the user in order to run the selection again, which doesn’t seem any simpler than just clicking “Change” on the Select Objects node.

Like Jacob said, you might try another package or go with Dynamo Player. But even with a Dynamo Player approach the user would still have to click the reset button to clear the selection. The downside is that if the graph has other user inputs, those would be reset as well.


So after all that…I think it might be easiest to click ‘Change’.


My script is so close to being perfect! Thanks @mzjensen for helping resolve this issue. However, I just have a quick question on Dynamo Player. I am now able to refresh the Select Option but the output is greyed out. I know the script works because it runs fine in the Dynamo Watch Node. I have followed the steps as identified in this thread:

(Meaning, I have set the watch node as “Is Output” and Renamed the Watch Node.) However when I try to run in Dynamo Player the result tab is greyed out as shown here:

Thanks for any help!

@austin_perigee did you press Play in Dynamo Player? It will be grayed out until there is actually a result.

That’s it! Thank You