<?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 Collect Room Tag Families in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/collect-room-tag-families/m-p/7884211#M51391</link>
    <description>&lt;P&gt;Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to collect all parent family types of a Room Tag within a project. Before I continue, I would like to preface by saying that:&lt;/P&gt;&lt;P&gt;- I have experience with the API and Filtered Element Collector, however, having a little road bump with this one&lt;/P&gt;&lt;P&gt;- I have read through examples like collecting OST titleblocks which was a similar situation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main line of code in question is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ICollection&amp;lt;Element&amp;gt; tagtypes = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RoomTags).OfClass(typeof(Family)).ToElements();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I iterate over each element in tagtypes to get its .Name it returns nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ICollection&amp;lt;Element&amp;gt; tagtypes = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RoomTags).ToElements();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I iterate over each element in tagtypes to get its .Name it returns each room tag's respective Family Type Name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like is the Name of&amp;nbsp;each PARENT Room Tag Family. So if a project had (5) Room Tag Families. Regardless of subsidiary Types, I would like just a list of the names of those (5) Room Tag Families. Is there something I need to adjust with my collector statement? Thank&amp;nbsp; you!&lt;/P&gt;</description>
    <pubDate>Mon, 26 Mar 2018 13:50:06 GMT</pubDate>
    <dc:creator>rvtquestions</dc:creator>
    <dc:date>2018-03-26T13:50:06Z</dc:date>
    <item>
      <title>Collect Room Tag Families</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/collect-room-tag-families/m-p/7884211#M51391</link>
      <description>&lt;P&gt;Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to collect all parent family types of a Room Tag within a project. Before I continue, I would like to preface by saying that:&lt;/P&gt;&lt;P&gt;- I have experience with the API and Filtered Element Collector, however, having a little road bump with this one&lt;/P&gt;&lt;P&gt;- I have read through examples like collecting OST titleblocks which was a similar situation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main line of code in question is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ICollection&amp;lt;Element&amp;gt; tagtypes = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RoomTags).OfClass(typeof(Family)).ToElements();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I iterate over each element in tagtypes to get its .Name it returns nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ICollection&amp;lt;Element&amp;gt; tagtypes = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RoomTags).ToElements();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I iterate over each element in tagtypes to get its .Name it returns each room tag's respective Family Type Name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like is the Name of&amp;nbsp;each PARENT Room Tag Family. So if a project had (5) Room Tag Families. Regardless of subsidiary Types, I would like just a list of the names of those (5) Room Tag Families. Is there something I need to adjust with my collector statement? Thank&amp;nbsp; you!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 13:50:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/collect-room-tag-families/m-p/7884211#M51391</guid>
      <dc:creator>rvtquestions</dc:creator>
      <dc:date>2018-03-26T13:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Collect Room Tag Families</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/collect-room-tag-families/m-p/7885433#M51392</link>
      <description>&lt;P&gt;families are a bit quirky. You find the Category via family.FamilyCategory instead of the usual family.Category.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;			IEnumerable&amp;lt;Element&amp;gt; roomtagFamilies = new FilteredElementCollector(doc)
				.OfClass(typeof(Family))
				.Cast&amp;lt;Family&amp;gt;()
				.Where( f=&amp;gt; f.FamilyCategory.Id.IntegerValue == (int)BuiltInCategory.OST_RoomTags);&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Mar 2018 19:39:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/collect-room-tag-families/m-p/7885433#M51392</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-03-26T19:39:37Z</dc:date>
    </item>
  </channel>
</rss>

