
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Edit: I've found that unlike Wall and Floor class, Ceiling class does not have a getter for CeilingType. What are my options for getting this? I've tried casting Ceiling to HostObject which compiles, but breaks in revit.
Hi,
I'm diving into the Revit API for the first time to make a tool. I've got the tool up and running for Walls and Floors, but ceilings are not acting the way they should (according to the docs). specifically, I cannot get a CeilingType property from my Ceiling element. Below is a sequence that works perfectly for my List of floors
//Floor overload for wipe public static void wipe(List<Floor> uniqueFloors) { foreach (Floor currItem in uniqueFloors) { CompoundStructure cs = currItem.FloorType.GetCompoundStructure(); ElementId fakeId = new ElementId(-1); cs = currItem.FloorType.GetCompoundStructure();
However, replacing Floor with Ceilings, I am unable to retrieve currItem.CeilingType.
//Floor overload for wipe public static void wipe(List<Ceiling> uniqueCeilings) { foreach (Ceiling currItem in uniqueCeilings) { CompoundStructure cs = currItem.CeilingType.GetCompoundStructure(); //error, no "CeilingType property" ElementId fakeId = new ElementId(-1); cs = currItem.CeilingType.GetCompoundStructure();
according to the Revit API docs, Ceilings Inherit the same as Floors, so I have no idea why this isn't working. Explicitly casting to HostObject doesn't work either. Any help is appreciated!
Solved! Go to Solution.