IList<Element> specialityEquip = new FilteredElementCollector(doc).WherePasses(new ElementCategoryFilter(BuiltInCategory.OST_SpecialityEquipment)).
WhereElementIsNotElementType().ToElements();
foreach (Element elem in specialityEquip)
{
LocationPoint loc = elem.Location as LocationPoint;
string z = loc.Point.Z.ToString();
Parameter p = elem.LookupParameter("Object Height");
p.SetValueString(z);
}