Get room from furniture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a c# function that simply populates a parameter with the room number for a furniture object. On some of my custom families. The room property is null and my function will not work. This is the code that retrieves the data:
ofurn.get_Parameter("FurnRoom").Set(ofurn.Room.Number.ToString());
I;m pretty sure that the families are collected in the selection set properly. If I do a Revit Lookup into an object that works and one that fails, I can see that the property is missing. Some of these families work and some don't. These happen to be different families but are adjacent to each other in the model. How can this happen? What do I need to do differently? All the "stock" families are fine so maybe it is something with my families, but whay do some contain data and others do not? I've attached screenshots of a good one and a bad one. Note the "Room" parameter. Thanks for any help.