This topic has been talked about a few times already. The following is such a pretty old post.
Parameter of Revit API – 32: Erase Project Parameter
Since the post and its code snippets are very old, most likely addressing Revit 2010/2011 at that time, the solution as suggested there may not work for newer versions such as Revit 2018/2019 due to changes inside Revit and its API.
Based on experiences so far, it is not a good idea to only call the Document.ParameterBindings.Remove(Definition) method trying to erase a project parameter (bound parameter or API term ParameterBinding). Instead, please find the parameter element corresponding to the ParameterBinding Definition and delete the element from the document. We may double confirm the project parameter deletion through removing the Definition from the ParameterBindings as well, but we'd better wrap the code into a try/catch block to avoid program being aborted in case.
It look a pretty simple task, but its fufillment is very challenging, as discussed here and there. Another post talks about it.
Parameter of Revit API – 27: Erase Shared Parameter
Recent Comments