YES/NO parameter - The parameter's storage type is not a string

Hi,

I’ve created some shared YES/NO parameters for a Door schedule. Next, I’m trying to create a routine where I swap the Yes/No when I add schedule into a sheet.

For example, for the parameter VP - Vision panel I want for “YES” equal to VP and “NO” equal to empty.

The routine works until “Element.SetParameterByName” as you can see on the image. the warining is “Warning: Element.SetParameterByName operation failed. The parameter’s storage type is not a string.”

Obliviously I’m doing something wrong. Any solutions please?

Yes no parameters in Revit are true/false values and are stored as 1/0.

Hi, thanks for the reply. If you check the “watch node” after the “if” it works. 0= " ", 1= VP and 2= " ". the problem is when I’m trying to send the data back to revit.

How would you do this in Revit?

Start a new schedule with just the Mark and the “VP - Vision Panel” parameters. Note that the “VP - Vision Panel” parameter is a true/false parameter, so in Revit you can only mark the parameter as a checkbox or not. Yet you’re now asking it to store a value of “VP” which is neither checked nor unchecked. Revit can’t do it so you’re getting the message ‘the storage type is not a string” in response to doing so.

To solve this, you need to store the data in a parameter - perhaps the comments field or a new parameter entirely.

Please see image below.

Basically I create a new schedule and then some parameters. All the ones in vertical are YES/NO parameters. What I’m trying to do is convert those “yes/no” for “VP” for yes and “empty” for no.

I did it already simply creating a new conditional paramater for each one and then hided them. All of this without dynamo. I’m sure there is a way to do it in dynamo

Yes there is. Make a new parameter, then set the value. Reusing the same parameter will not be an option.

Hi Jacob,

I made the new parameter as you said and it works.The only things is I could achieve this exactly the same without Dynamo, simply creating a conditional formatting parameter in schedule for that parameter. That’s why I though I could achieve this in Dynamos without creating a new parameter.

A conditional IF statement on a second parameter is how I have always done this since I hate the default “Yes” and “No” in Revit.

Hi Sean,

How do you apply a IF statement to the second parameter in Dynamo? thanks

Sorry, I didn’t mean in Dynamo, just in the schedule inside Revit. I used the Yes/No parameter to drive the value of a Text parameter.

Yes, that’s exactly what I did replacing for example for Vision Panel: Yes=VP and No=“Empty”. I just though there was a way to do this in Dynamo without creating this new parameter. thanks