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

Re: Get room informations from FamilySymbol

$
0
0

I think you should be able to use the "is" statement to get this done.

 

Example:

        private Room FamRoom()
        {
            IList<FamilyInstance> fams = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).Cast<FamilyInstance>().ToList();
            if (fams[12] is FamilyInstance famIst)
            {
                Room room = famIst.Room;
                return room;
            }
            return null;
        }

Viewing all articles
Browse latest Browse all 66855

Trending Articles



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