Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm attempting to get a list of the exterior window constructions using MEPBuildingConstruction.GetConstructions. I can get roofs/walls/floors ect. fine, but I can't get windows or skylights. I get a "System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.' Error. " Do I need to be looking at a different function?
ElementId eid = EnergyDataSettings.GetBuildingConstructionSetElementId(doc);
MEPBuildingConstruction mepBuildingConstruction = doc.GetElement(eid) as MEPBuildingConstruction;
List<Construction> roofConstructions = mepBuildingConstruction.GetConstructions(ConstructionType.Roof).ToList(); //This works fine
List<Construction> exteriorWindowConstructions = mepBuildingConstruction.GetConstructions(ConstructionType.ExteriorWindow).ToList(); //This does not work. I get a System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.'
-Kevin Lawson, PE
www.rippleengineeringsoftware.com
Revit heating and cooling load calculations in one click!
www.rippleengineeringsoftware.com
Revit heating and cooling load calculations in one click!
Solved! Go to Solution.