Dynamo Remembering Values from Past Runs

Hi All,

I’ve made a script to create views, apply a view template to them and place them on sheets. It worked perfectly a few months ago. However now when I open it, it works correctly the first time you run it on a file. After that myriad errors occur, all involving storing values from the last run. Is there some way to prevent this. Sometimes it makes a new view and tries to place it on the previous sheet. Sometimes it tries to select the legend view from the previous sheet and then fails to place it on the new sheet.
GENERATE UNIT PLANS AND SHEET data shape feet.dyn (413.6 KB)

I’ve run it multiple times on the same file last time I used it extensively with no issues at all. Can anyone tell my why this happening and if there’s anything I can do about it?

Are you running in Dynamo Player or from the graph? Running in Player should prevent this from happening. Otherwise you need to build in some logic to clear previous values or otherwise prevent element binding.