title: How do I get all parameters and their value in Revit through C#?
body: <pre><code>    public IList&lt;Parameter&gt; GetAllParameters(Reference reference, Document doc, IList&lt;ElementId&gt; elementIds)
      {
          Element element = SelectElement(doc, reference);
  
          ParameterSet pSet = element.Parameters;
  
          IList&lt;Parameter&gt; param = new List&lt;Parameter&gt;();
  
          foreach (Parameter p in pSet)
          {
              if (p.Definition.Name.Equals(element.Name))
              {
                  element.GetParameters(element.Name);
  
                  param.Add(p);
              }
          }
  
          return param;
      }
  </code></pre>
  <p>I am supposed to get all parameters from an element in Revit, although, this isn't just working. How can I fix this?</p>