Set a Key Schedule Parameter back to (none)

Is there a way to set a key schedule parameter back to (none)? I have a script where I can easily set a key parameter to the element of a valid key, but I can’t figure out how to unset the parameter, which I need to do if certain conditions aren’t met. I can’t set the parameter with the string “(none)” even though that is what is output when an unset parameter is queried. I also can’t set the parameter to a null value, which also throws an error.

Try feeding a ‘null’ for the key in question.

I did, but get an error on the set parameter by name node

Warning: Element.SetParameterByName operation failed.
The call is ambiguous between the following methods or properties: ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, Revit.Elements.Element)’ and ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, string)’

Hmmmm… try using an invalid element? (Select by ID, -1 as the ID, feed that). Might not work though. This may require a more direct Revit API interaction (IE: Python, or a custom zero touch node) to ensure the right override.

Hello…have you tried this one,it could probably help…


Setting it to an invalid element (which resulted in null) didn’t work, but the springs node did.

Thank you!

1 Like