<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REVIT API - Rooms Get Boundaries Segments in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695948#M23094</link>
    <description>&lt;P&gt;I don't see where the issue is, where are you trying to convert Element to Room? You should be able to do that fairly easily. The way I usually go about it when using a Filtered Element Collector is by Casting to the type I need and sending it to a list. (You'll need a reference to System.Linq for this).&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;List&amp;lt;Room&amp;gt; list = collector.WherePasses(filter).Cast&amp;lt;Room&amp;gt;().ToList();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;However, reassigning an Element to a Room variable while iterating over the collection should also work just as well. What issues were you having with it?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 14:45:54 GMT</pubDate>
    <dc:creator>AGGilliam</dc:creator>
    <dc:date>2021-10-18T14:45:54Z</dc:date>
    <item>
      <title>REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10694319#M23089</link>
      <description>&lt;P&gt;Hi there everyone, I am really new in the Revit API and I've been facing a little problema with a little charlleng i set. So i have been trying to create Floors from Rooms in Revit, and for that I used a element Collector to get all rooms in the project, and I tried to use the "GetBoundariesSegments" method to get the boundaries segment from the Rooms in the projetc.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However, It appears that Rooms don't have a "GetBoundariesSegment"...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="juninhopaica_0-1634510845647.png" style="width: 889px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/978235i30FF9D03E0E22A1C/image-dimensions/889x500?v=v2" width="889" height="500" role="button" title="juninhopaica_0-1634510845647.png" alt="juninhopaica_0-1634510845647.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code Im using is the sample present in the Revit API Docs 2020 for Room Class :&amp;nbsp;&lt;A href="https://www.revitapidocs.com/2020/75c9d2c7-a402-ea8b-9e7c-f8bc3510bbd5.htm" target="_blank"&gt;Room Class (revitapidocs.com)&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried looking for other examples, trying to convert the elements in collector from Autodesk.Revit.DB.Elements to Autodesk.Revit.DB.Architecture.Room in order to use the methods, and even see if I was missing a directive or assembly method.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can someone help me with this? Thanks for the patience with me, I am a begginer so this can be really simple for most of the people out there...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 22:54:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10694319#M23089</guid>
      <dc:creator>juninhopaica</dc:creator>
      <dc:date>2021-10-17T22:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695697#M23090</link>
      <description>&lt;P&gt;If you look at that first error, it's trying to convert Autodesk.DesignScript.Geometry.Point to Autodesk.Revit.DB.LocationPoint. The reference to Room that you're using appears to be from the wrong namespace (DesignScript instead of Revit). Add Autodesk.Revit.DB.Architecture. in front of Room and you should be set.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void Getinfo_Room(Autodesk.Revit.DB.Architecture.Room room)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 13:20:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695697#M23090</guid>
      <dc:creator>AGGilliam</dc:creator>
      <dc:date>2021-10-18T13:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695763#M23091</link>
      <description>&lt;P class="lia-align-left"&gt;I'm just wondering, from which assembly dose the namespace "&lt;STRONG&gt;Autodesk.DesignScript.Geometry...&lt;/STRONG&gt;" come from ?!&lt;BR /&gt;dose it related to the dynamo/python for Revit ?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 13:44:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695763#M23091</guid>
      <dc:creator>Omar_Amen</dc:creator>
      <dc:date>2021-10-18T13:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695795#M23092</link>
      <description>&lt;P&gt;I'm not sure since I've never seen it before, but I did a quick Google search and it looks like it's from the ProtoGeometry.dll file that comes with Dynamo. &lt;A href="https://forum.dynamobim.com/t/autodesk-designscript-runtime-interface-geometry/24177" target="_blank" rel="noopener"&gt;Here's the link&lt;/A&gt; I used if you're curious.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 13:53:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695795#M23092</guid>
      <dc:creator>AGGilliam</dc:creator>
      <dc:date>2021-10-18T13:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695892#M23093</link>
      <description>&lt;P&gt;I see, that really solved one problem!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="juninhopaica_0-1634566220319.png" style="width: 896px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/978554iE31292896E8E712E/image-dimensions/896x504?v=v2" width="896" height="504" role="button" title="juninhopaica_0-1634566220319.png" alt="juninhopaica_0-1634566220319.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However I found other right after that. When using a collector with a Roomfilter to get all Rooms in a specific project, the objects that I get returned are actually (Autodesk.Revit.DB.Elements), and not (Autodesk.Revit.DB.Architecture.Rooms) and the later don't have a "GetBoundariesSegment" method. Here is the method to collect all rooms that I used...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="juninhopaica_1-1634567122516.png" style="width: 891px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/978563i542CE853F4C45D30/image-dimensions/891x501?v=v2" width="891" height="501" role="button" title="juninhopaica_1-1634567122516.png" alt="juninhopaica_1-1634567122516.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I used the RoomFilter (&lt;A href="https://www.revitapidocs.com/2015/356881b1-5ee4-621a-0379-965c3e6f6dcf.htm" target="_blank"&gt;RoomFilter Class (revitapidocs.com)&lt;/A&gt;) which is actually a slow filter, and has a sample for use. I tried to convert the elements from Autodesk.Revit.DB.Element to&amp;nbsp;Autodesk.Revit.DB.Architecture.Room but with no succsse...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Im sorry to bother with another question, but how would we be able to use Room elements from the filter ? Thanks for the help, is really nice to see that the community here is so recepitive!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 14:26:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695892#M23093</guid>
      <dc:creator>juninhopaica</dc:creator>
      <dc:date>2021-10-18T14:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695948#M23094</link>
      <description>&lt;P&gt;I don't see where the issue is, where are you trying to convert Element to Room? You should be able to do that fairly easily. The way I usually go about it when using a Filtered Element Collector is by Casting to the type I need and sending it to a list. (You'll need a reference to System.Linq for this).&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;List&amp;lt;Room&amp;gt; list = collector.WherePasses(filter).Cast&amp;lt;Room&amp;gt;().ToList();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;However, reassigning an Element to a Room variable while iterating over the collection should also work just as well. What issues were you having with it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 14:45:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10695948#M23094</guid>
      <dc:creator>AGGilliam</dc:creator>
      <dc:date>2021-10-18T14:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: REVIT API - Rooms Get Boundaries Segments</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10696010#M23095</link>
      <description>&lt;P&gt;Yes I was actually having a hard time with casting the type, but you really cleared the problem for me...&lt;BR /&gt;I'm a Civil Engineer, but just recently I got in the area of programing, because of that I am still getting the hang of some definitions and concepts...&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I did did not realize that we could use the cast type... Thank you so much my friend, god bless you&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 15:04:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-api-rooms-get-boundaries-segments/m-p/10696010#M23095</guid>
      <dc:creator>juninhopaica</dc:creator>
      <dc:date>2021-10-18T15:04:26Z</dc:date>
    </item>
  </channel>
</rss>

