Reset / Set Parameter to Empty / Blank / Null

I know that this question has been asked several times, but I find difficult to belive that we still have no solution.

We all want from time to time to reset parameter to empty, as they came when created. With strings it is simple, but with other parameters I haven’t found any solution.

There would be 3 approaches:

  • Dynamo/Python overwrite: I have been testing it for hours. I can’t manage to make Revit to accept an empty value. It will always test that it has to be a doble, or int, or whatever.
  • API overwrite: I guess that the problem is quite similar to using Pyhton. But I have no idea about creating Macros.
    -Dynamo remove and create Parameter workflow: The Idea would be to copy all the Parameter, remove it, create it again, and fill it with the data.

Before trying the last option I would like to discard the other two and to know if someone has already done something similar. Can this system create any error?

Have you tried Spring nodes image ?

I have updated my springs package and tested the node. I am trying to reset a Parameter (Length) that I have in my rooms, but no results.

Am I missing something?

Looks like it only works for parameters that expect an Element as input… From Springs github : *

Element.SetParameterToNone is useful when you need to set parameters such as View Template, Phase Demolished or Top Constraint to None / Unconstrained

1 Like

Thanks @Einar_Raknes anyway :slight_smile:

Someone hat some other info?

This is problem… Guessing nobody have solved it yet??

Hi @K.Kvistgaard

I have followed my 3rd option:

With a Dynamo Graph I am able to copy the values in a parameter, remove it, create it again and feed it. I use a “dummy” value (e.g.: 999) which is removed, and only “real” data is than copied to the new parameter.

The only problem I’ve found is that the parameter will disappear from all schedules, and I haven’t developed a solution for that.

Any luck with resetting parameters?

Hi @jes.gonzalez as I said, it is possible to copy the information, remove the parameter, create it again and feed it with the old information. I am pretty happy with the results even when it is not perfect.

There is a new feature in Revit 2020 API, have anyone tested this?

Parameter API additions

Hiding empty parameters

The new property

  • ExternalDefinition.HideWhenNoValue

Indicates if the shared parameter should be hidden from the property palette and Element.GetOrderedParameters() when it has no value.

Similar functionality has been added to other classes:

  • ExternalDefinitionCreationOptions.HideWhenNoValue
  • SharedParameterElement.ShouldHideWhenNoValue()

The new method:

  • Parameter.ClearValue()

can reset the value of a shared parameter which has the HideWhenNoValue flag set back to a cleared state. (This method is not applicable to clear the value of any other parameter type).


That last sentence in parenthesis doesn’t sound too promising though…

Any chance someone could help me with the Python API to implement this? First question is if this can even be done. I have values which I need to reset the state of; these are boolean parameters.

Can I do this with the Parameter.ClearValue() Method?

I don’t even know where to begin…

I am not finding this node in spring nodes.

After installing spring node package, if I search it as Springs.Element.SetParameterToNone it is not finding any node.
please help where I can find this node

hello @shashank.baganeACM …strange…you should find it here…