Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

if condition in parameter value dont work

$
0
0

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
salam.JPG


Viewing all articles
Browse latest Browse all 67020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>