You have several ways to retrieve element parameters’ name/value/type etc. Let’s use one simple example to show this. If you want to get one parameter from an element, usually you can through the BuiltInParameter enum or the parameter’s name. Through the BuiltInParameter is efficient and can avoid string localization problem, try to use this way if you can. The detail code is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
namespace myRevitApp
{
public class WallFilter : ISelectionFilter
{
/// <summary>
/// Allow Wall to be selected
/// </summary>
/// <param name=”element”>A candidate element in selection operation.</param>
/// <returns>Return true for wall. Return false for non wall element.</returns>
public bool AllowElement(Element element)
{
return element is Wall;
}
/// <summary>
/// Allow all the reference to be selected
/// </summary>
/// <param name=”refer”>A candidate reference in selection operation.</param>
/// <param name=”point”>The 3D position of the mouse on the candidate reference.</param>
/// <returns>Return true to allow the user to select this candidate reference.</returns>
public bool AllowReference(Reference refer, XYZ point)
{
return true;
}
}
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
public class Class1 : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
{
// Select elements. Click “Finish” or “Cancel” buttons on the dialog bar to complete the selection operation.
List<ElementId> elemDeleteList = new List<ElementId>();
WallFilter wfilter = new WallFilter();
Reference eRef = commandData.Application.ActiveUIDocument.Selection.PickObject(ObjectType.Element, wfilter, “Please pick a wall.”);
if (eRef != null && eRef.Element != null)
{
// Get parameter through builtin parameter enum, this is efficient, use this way if you know the parameter enum
Parameter param = eRef.Element.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS);
if (param != null)
{
TaskDialog.Show(“My Revit APP”, “Wall comments: ” + param.AsValueString());
}
else
{
TaskDialog.Show(“My Revit APP”, “Cannot find wall comments!”);
}
// Get parameter through name
param = eRef.Element.get_Parameter(“Length”);
if (param != null)
{
TaskDialog.Show(“My Revit APP”, “Wall Length through name: ” + param.AsValueString());
}
else
{
TaskDialog.Show(“My Revit APP”, “Cannot find wall Length parameter through name!”);
}
}
return Result.Succeeded;
}
}
}

