<?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: Extract RFA files from document using Revit api in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12625829#M6792</link>
    <description>&lt;P&gt;I have a code snippet to test the functionality of "Revit.Async," which can serve as an example of saving a "Family" as an RFA file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find the code here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/KennanChan/Revit.Async/blob/master/TestCommand/SaveFamilyCommand.cs" target="_blank"&gt;Revit.Async/TestCommand/SaveFamilyCommand.cs at master · KennanChan/Revit.Async (github.com)&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2024 03:25:44 GMT</pubDate>
    <dc:creator>Kennan.Chen</dc:creator>
    <dc:date>2024-03-08T03:25:44Z</dc:date>
    <item>
      <title>Extract RFA files from document using Revit api</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622213#M6788</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am trying to get RFA file from current document, but i am getting this error :&lt;/P&gt;&lt;P&gt;Autodesk.Revit.Exceptions.InvalidOperationException: 'The document is currently modifiable! Close the transaction before calling EditFamily.'&lt;/P&gt;&lt;P&gt;But i am not started any transaction in code.&lt;/P&gt;&lt;P&gt;I used the above code in external event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code :&amp;nbsp;&lt;/P&gt;&lt;P&gt;FilteredElementCollector collector = new FilteredElementCollector(doc);&lt;BR /&gt;ICollection&amp;lt;Element&amp;gt; plantElements = collector.OfCategory(BuiltInCategory.OST_Planting).ToElements();&lt;/P&gt;&lt;P&gt;foreach (var element in plantElements)&lt;BR /&gt;{&lt;BR /&gt;Family fam = null;&lt;BR /&gt;if (element is FamilyInstance)&lt;BR /&gt;{&lt;BR /&gt;familyName = (element as FamilyInstance).Symbol.FamilyName;&lt;BR /&gt;objectName = (element as FamilyInstance).Symbol.Name;&lt;BR /&gt;fam = (element as FamilyInstance).Symbol.Family;&lt;BR /&gt;}&lt;BR /&gt;if (element is FamilySymbol)&lt;BR /&gt;{&lt;BR /&gt;familyName = (element as FamilySymbol).FamilyName;&lt;BR /&gt;objectName = (element as FamilySymbol).Name;&lt;BR /&gt;fam = (element as FamilySymbol).Family;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Document familyEditorDocument = fam.Document.EditFamily(fam);&lt;BR /&gt;familyEditorDocument.SaveAs(@"D:\" + fam.Name + ".rfa");&lt;BR /&gt;familyEditorDocument.Close();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this part of code available inside the External event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bharath&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 01:51:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622213#M6788</guid>
      <dc:creator>bharathkumarp</dc:creator>
      <dc:date>2024-03-07T01:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract RFA files from document using Revit api</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622342#M6789</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN class=""&gt;bharathkumar:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; if u want to save as thr family&amp;nbsp;document , you can use function Family.SaveAs() .&amp;nbsp; In&amp;nbsp; u code , like to saveas the docuemnt of familyDoc , so throw the exception .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 03:23:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622342#M6789</guid>
      <dc:creator>scgq425</dc:creator>
      <dc:date>2024-03-07T03:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract RFA files from document using Revit api</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622502#M6790</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;&lt;BR /&gt;Thanks of you reply.&lt;BR /&gt;I am not quite understand your answer.&lt;BR /&gt;Can you please give me any example ? if possible.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 04:54:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622502#M6790</guid>
      <dc:creator>bharathkumarp</dc:creator>
      <dc:date>2024-03-07T04:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract RFA files from document using Revit api</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622549#M6791</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15161273"&gt;@bharathkumarp&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;This might be a good place to start since the question has come up multiple times on this forum.&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/how-to-save-family-to-a-new-file/m-p/12162514#M73339" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/how-to-save-family-to-a-new-file/m-p/12162514#M73339&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 05:23:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12622549#M6791</guid>
      <dc:creator>moturi.magati.george</dc:creator>
      <dc:date>2024-03-07T05:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extract RFA files from document using Revit api</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12625829#M6792</link>
      <description>&lt;P&gt;I have a code snippet to test the functionality of "Revit.Async," which can serve as an example of saving a "Family" as an RFA file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find the code here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/KennanChan/Revit.Async/blob/master/TestCommand/SaveFamilyCommand.cs" target="_blank"&gt;Revit.Async/TestCommand/SaveFamilyCommand.cs at master · KennanChan/Revit.Async (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 03:25:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extract-rfa-files-from-document-using-revit-api/m-p/12625829#M6792</guid>
      <dc:creator>Kennan.Chen</dc:creator>
      <dc:date>2024-03-08T03:25:44Z</dc:date>
    </item>
  </channel>
</rss>

