<?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: Can't  get the GetFamilySymbolIds of a specific family in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-the-getfamilysymbolids-of-a-specific-family/m-p/10722632#M22802</link>
    <description>&lt;P&gt;I believe the &lt;U&gt;Family&lt;/U&gt; class represents the family definition that has been loaded into a &lt;U&gt;project&lt;/U&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not believe that you can use the Family class in the &lt;U&gt;RFA family editor context&lt;/U&gt;, and hence not its&amp;nbsp;GetFamilySymbolIds method either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess the articles on the Family (definition) API will provide a good place to start for understanding the difference between the project and family editor contexts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.25" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.25&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 10:27:30 GMT</pubDate>
    <dc:creator>jeremy_tammik</dc:creator>
    <dc:date>2021-10-29T10:27:30Z</dc:date>
    <item>
      <title>Can't  get the GetFamilySymbolIds of a specific family</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-the-getfamilysymbolids-of-a-specific-family/m-p/10721897#M22801</link>
      <description>&lt;P&gt;I am trying to get the FamilySymbol ref to the&amp;nbsp;CurrentType of a specific family which is loaded by .rfa document.I can get the family of document.but when I use the "GetFamilySymbolIds" method to get all familySymbolIds,it returns a empty set.The code&amp;nbsp; as follow:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; string rfa = @"E:\work\door.rfa";
     Application application = commandData.Application.Application;
            Document doc = application.OpenDocumentFile(rfa);
            if (!doc.IsFamilyDocument)
            {
                TaskDialog.Show("Tips", "It's not a family doucument");
                return Result.Failed;
            }
            Family family = doc.OwnerFamily;
            if (family == null)
            {
                TaskDialog.Show("Tips", "family == null");
                return Result.Failed;
            }
            FamilyManager familyManager = doc.FamilyManager;
            FamilyType familyType = familyManager.CurrentType;
            ISet&amp;lt;ElementId&amp;gt; familySymbolIds = family.GetFamilySymbolIds();
            if (familySymbolIds == null)
            {
                TaskDialog.Show("Tips", "familySymbolIds == null");
                return Result.Failed;
            }
            foreach(ElementId symbolId in familySymbolIds)
            {
                FamilySymbol familySymbol = doc.GetElement(symbolId) as FamilySymbol;
                if (familySymbol.Name == familyType.Name)
                {
                    //We find the current family symbol of the rfa document;
                    break;
                }
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;can anybody help me to find the promble,and the .rfa file is &lt;SPAN&gt;attached&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 01:44:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-the-getfamilysymbolids-of-a-specific-family/m-p/10721897#M22801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-29T01:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can't  get the GetFamilySymbolIds of a specific family</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-the-getfamilysymbolids-of-a-specific-family/m-p/10722632#M22802</link>
      <description>&lt;P&gt;I believe the &lt;U&gt;Family&lt;/U&gt; class represents the family definition that has been loaded into a &lt;U&gt;project&lt;/U&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not believe that you can use the Family class in the &lt;U&gt;RFA family editor context&lt;/U&gt;, and hence not its&amp;nbsp;GetFamilySymbolIds method either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess the articles on the Family (definition) API will provide a good place to start for understanding the difference between the project and family editor contexts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.25" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.25&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 10:27:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/can-t-get-the-getfamilysymbolids-of-a-specific-family/m-p/10722632#M22802</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-10-29T10:27:30Z</dc:date>
    </item>
  </channel>
</rss>

