Get Boundary Elements in RVT 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to test out and learn more about the room/space and boundary classes for the Revit API. I tried debugging an example I found from Jeremy:
Under the section:
GetBoundarySegmentElement External Command Implementation
However debugging gives me the error:
---
List<Room> rooms = new List<Room>(
sel.Elements.Cast<Room>() );
Error CS1061 'Selection' does not contain a definition for 'Elements' and no extension method 'Elements' accepting a first argument of type 'Selection' could be found (are you missing a using directive or an assembly reference?) GetBoundarySegmentElement
---
foreach( BoundarySegment seg in loop )
{
Element e = seg.Element;
Severity Code Description Project File Line Suppression State
Warning CS0618 'BoundarySegment.Element' is obsolete: 'This property is deprecated in Revit 2016. Use ElementId instead.' GetBoundarySegmentElement
---
Any help would be greatly appreciated to help get this running for RVT 16. Thank you!