CreateProjectparameter + set default values


I would like to create a number of Project Parameters and set default values simultaneously - in a single run.
I have tried doing this with Parameter.CreateProjectParameter and Element.SetParameterByName, but no default values are set if the two nodes run simultaneously in the same script. If I run the two components separately it works fine. I tried doing it in a code block with design script and thought that would do the trick, but it didn’t. Home.dyn (19.4 KB)

here you go
Home_erfajo.dyn (7.1 KB)

thank you, but still no default values (false, 25, 25, 25, 25) added :frowning:

it works perfectly at me… and it should do so since it waits for the “void” output.

You can also do it this way… still the same method, waiting for an output from “void”
Home_erfajo.dyn (7.1 KB)

1 Like

@Thomas_Perkov Show us your graph. It will help others to see your issue and point you to the right direction.

Next time, I’ll take a screenshot and share it too. :slightly_smiling_face: I literally just opened and ran erfajo’s first suggestion and it didn’t work. :-S Maybe because I use Revit 2016 for my current project. It works great with the second example from @erfajo, Thank you! :slight_smile:

Your are welcome Thomas… and looking forward to your next visit in the office :slight_smile: