Change Pipe parameter to sequencing number & temporarily change pipe color when it's selected

I am trying to create a script that will be used to apply a sequencing value to each pipe that I select. I used the “Isolated Pick Model Elements(ordered)” node from Rhythm to make sure that the sequencing value is placed in the order that I select pipes. At this time the script works but I am hoping to make some improvements.

  1. I would like the pipes that I select to temporarily change color (to a specified color so all selected elements are the same). The elements would change color as they are selected & then once I hit esc to end the script the pipes would revert to their normal color.

  2. I have a prefix assigned to each piping branch so they can be easily sorted later. Currently I have to open the script and change the prefix value each time I get to a new “branch”. (see example picture below for how the spool would look) Ideally there would be a text box that would pop up when I run the script that will ask for the prefix value. (in my dyn. I use the prefix value for both the branch ID & Piper Number prefix.)

    Change Piper Number.dyn (20.9 KB)

I found a node from Data-Shapes called UI.MutipleInputForm++ that hopefully will help me with the pop up box in Dynamo Player. I am completely in the dark on how I would temporarily change colors though.

It would have to be two separate transactions. Selecting the element would apply an override. Hitting esc (maybe) or otherwise continuing the graph function would remove the override. It seems possible.

Why do you need to assign a color and then remove it immediately? Or do you mean assign a color per prefix and then when you start a new branch the colors are removed?

The only reason for applying a color is to track the pipes that I have selected already, this way I don’t select the same pipe twice or miss one. The idea is that the pipe spool & prefab will be easy to put together.
I will try to come up with something to change the colors temporarily, I’m assuminig I would start at the “Isolated Pick Model Elements(ordered)” node & go from there.

Thanks!

Actually now that I think about it that probably wouldn’t work with those nodes, because you don’t override the element until you’ve finished your selections.

You might be able to do it in Python by combining the selection and override function into a loop.

I should clarify that I only intend to have the pipes change color temporarily as I only edit one branch of piping at a time. It wouldn’t hurt anything if the pipes colors were changed & then once I was all done with all of the branches I could manually override the graphics.

Regarding the pop up box, I set up my script so that a pop up box appears when I click “Run” (I have Dynamo set to manual). The issue I have now is that the script one works for the first pipe I click on, then it seems to just end as no parameter values are applied to the following pipes. See picture below.