i have a problem with my code when i want to create if condition in value of my parameters and run the code .the code dont work and massage box wasnt show. this is my code
FilteredElementCollector col = new FilteredElementCollector(doc, doc.ActiveView.Id);
foreach (Element e in col)
{
Parameter p = e.get_Parameter(BuiltInParameter.UNIFORMAT_CODE);
Parameter pa = e.get_Parameter(BuiltInParameter.KEYNOTE_PARAM);
if (p.AsString().Equals("A1010"))
{
if(pa.AsString().Equals("03300"))
{
TaskDialog.Show("this parameter exist","This Value Exist");
}
}
i even test with AsValueString() but it doesnt work and it gives me null reference error
↧
if condition in parameter value dont work
↧