How to make generating new project parameter conditional?

Hello, Dynamo community! I am a new Revit and Dynamo user. I am using Revit 2023, and Dynamo 2.16.1

I am trying to automate schedule generating with specific fields for the company’s past projects. However, some projects do not include project parameters in the schedule fields. Therefore my schedule generator script does not work properly, and users still need to manipulate it manually.

I tried to create a script that first checks for the parameters, and if they are not in the project parameters, then create them. I am working with if scope to make this happen. However, it does not work properly, creating new parameters anyway, even if they already exist! I appreciate any help!

One thing is the create project parameter node is executing all the time and not being controlled by the scopeif. Feed the parameter name string into the false input of the scopeif and then have the result of that feed into the parameterName input of the create project parameter node. Change the string that is inputting into the true input of the scopeif to double quotations " ". So if the parameter already exists, a blank will be passed thru the scopeif and into the parameterName input and the create project parameter node will fail to execute.

Once you do that and if you are still having issues with it not creating the parameter when it doesn’t already exist, then we can address that.

1 Like

Thank you very much for your smart solution. I think blank does not work the way we want I. However, I connected a false boolean to the true input of the if, and it worked perfectly!

1 Like