Data Shapes - Inital Value

Hello to all,
I did not find similar topic and I hope you can help me. I’m using UI.TextBox Data and UI.DropDown Data to pick up the Inputs and I have a question regarding the initial values.

If I Run the same script a couple of times (in the same Revit session), is it possible that on the each new run I have default values from the previous run?

For example, if I enter as an input in one of the TextBox Data “5000” is it possible that when I run the script next time (let say in 5 minutes from the previous run, without closing the Revit) that as default value in that box is that “5000”?

Also, I have a problem with Logo for this package, I posted my problem in the topic:

I assume that nobody seen that because it is “Solved”. If you can help, thank you in advance.

For what parameter you are entering 5000?

Hi Deniz,
I did took those “5000” as an example. I will not use that value for Set.Parameter blocks. I will use it to calculate something. Because of that in this case it is not relevant if I need to type “5000” or “XYZ” of “true” (integer, string or boolean).

I would just like to know if it is possible that dynamo somehow remember what I typed in the last Run and set that as Default Text for the UI.TextBox Data block.

I had that Idea to call that value from a parameter… You can do something like that :
Use CopyTo node after run… It will copy the value to clipboard. and then call them from clipboard… it is a bit risky… but an idea …

clipboard

Deniz, good idea, but I have multiple values that I want to Copy. I did also try to Export values to the Excel file with idea that if I need to use the same values more than once I will change values in the Excel and that will save me some time.

This method, for some reason, than show me only one UI box at the time, so I need to enter (of confirm previous) value for one Input, then window pop up again and again…

Thank you for your help, if you have a new idea I will be happy to try.

Save the resulting selection to an external file such as a CSV somewhere commonly accessible and stable across users after each run. Populate the default values by reading that file. You may need a means of sending a valid value for before the file exists, and converting data types before sending hem on will be a must, but this should work out.

Jacob thank you for the idea. I did already try that with Export and Import of the Excel file but then UI start to show differently than it should (instead of the two text input, drop down list and slider, when I hit the Run UI just show drop down list and slider). It looks like I created some kind of the loop from which Dynamo can not exit.

If you can take a look to the script and thanks in advance for the help.
P.S. Forum does not allow me to upload .csv file, that is why you will need to create one blank .csv before you run the script.

sample.dyn (75.7 KB)

Excel may be the issue due to the way it has to open and close the same file in the same graph, and on re-runs things can get a bit hairy. I’ll try and have a look later tonight, but attempting it with a txt file and leveraging Dynamo player for execution to keep the connection between the data container and the graph in a good state could solve things.

Jacob did you have any luck in order to set up initial values?

Got pulled aside before I finished. It’s in my calendar to check tonight. :slight_smile: