Set parameter value to selected elements problem

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

Here is result in revit

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.

2 Likes

or use Dyanmo Player

1 Like

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.

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

1 Like

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

2 Likes

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.

1 Like

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

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

2 Likes