FilteredElementCollector coll = new FilteredElementCollector(doc, doc.ActiveView.Id);
ICollection<Element> elems = coll.OfCategory(BuiltInCategory.OST_GenericAnnotation).ToElements();
using (Transaction tx = new Transaction(doc))
{
tx.Start("Update param");
foreach (Element el in elems)
{
if (el.Name.Equals("North symbol"))
{
try
{
Parameter p = el.LookupParameter("North angle");
TaskDialog.Show("parameter value", p.AsValueString());
}
catch (Exception e)
{
message = e.Message;
return Result.Failed;
}
}
}
tx.Commit();
}