Set parameter value to selected elements problem

revit
dynamo

#1

Hello,
I do some parking renumber with dynamo by selecting elements, sorting by location, then renumbering.
It worked well in dynamo. But when I select elements for another time, it changed parameter’s value not
only current selected elements but previous selected one. Here is my dynamo


#2

Here is result in revit


#3

That is a feature of Dynamo. When you run a script, the changes aren’t saved until you close the script/Dynamo. So if you run the script once, then change inputs and run it again, anything that was produced in the first run will be reverted back to original. This is intentional as it allows you to test your script without having to constantly undo the changes before each run.

The easy work around is to just close the script and open it again between successful runs.


#4

or use Dyanmo Player


#5

Thanks kennyb6 and Nico_Stegeman

I tried Dynamo Player. But this dynamo file need to insert value every time before run.
Is there anyway to make it easier to use? or I missed anything.


#6

You can use the Rhythm.Toggle node
each time you switch between true and false and true it makes a new run

and new elements


#7

Use Data-Shape to have a dialog prompt the User for a starting number


#8

Thanks again @Nico_Stegeman

I tried that node and it could run perfectly!

@Daniel_Hurtubise Thanks for you suggestion. I haven’t known about that before
but I will try to learn.


#9

If it solves your problem, please mark it as solution. And maybe leave a like here and there :smile:.


#10

Here’s a quick example
Parkings.dyn (22.9 KB)