Nominal Weight

Nominal Weight

Anonymous
Not applicable
609 Views
1 Reply
Message 1 of 2

Nominal Weight

Anonymous
Not applicable

How to extract the Value of Parameter W for HSS section with Revit API?

foreach (Element e in new FilteredElementCollector(doc)
                     .OfClass(typeof(FamilyInstance))
                     .OfCategory(BuiltInCategory.OST_StructuralColumns)
                     .Where(m => m.Name.Contains("HSS"))   // select just HSS columns
            {
                FamilySymbol fs = fi.Symbol;
                Family family = fs.Family;
                Parameter p = fi.LookupParameter("Nominal Weight");
                data += fi.Name + "   " +  family.Name + "  :  " + fs.Name + "   : " + fi.GetType ().ToString()+  "\n";
            }
            
            
            
            
            TaskDialog.Show("BI Params",data);

0 Likes
Accepted solutions (1)
610 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Your code looks fine.

 

If you see W in the element property window, you can just replace the string "Nominal Weight" by "W".

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder