<?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: IFC Export Options in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12446663#M32569</link>
    <description>&lt;P&gt;Can you please share the full implantation. Thanks in advance&lt;/P&gt;</description>
    <pubDate>Sun, 17 Dec 2023 16:14:40 GMT</pubDate>
    <dc:creator>Dinesh.GoswamiQDCPR</dc:creator>
    <dc:date>2023-12-17T16:14:40Z</dc:date>
    <item>
      <title>IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9686404#M32554</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to write an IFC exporter, but I can't find any Class in the API for all export settings. I mean, yes the is the "IFCExportOptions" Class, but it just has like 6 Settings instead of more than 20 in the Revit software UI as seen in the picture. Especially the blue marked settings are really important in my case.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 07:02:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9686404#M32554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-12T07:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9688858#M32555</link>
      <description>&lt;P&gt;If you wish to dive deeper into the IFC export, you should take a look at the Revit IFC Export open source project:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sourceforge.net/p/ifcexporter/discussion/general" target="_blank"&gt;https://sourceforge.net/p/ifcexporter/discussion/general&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Autodesk/revit-ifc" target="_blank"&gt;https://github.com/Autodesk/revit-ifc&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 08:18:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9688858#M32555</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-08-13T08:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9789844#M32556</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&lt;/P&gt;&lt;P&gt;The IFCExportOptions relies on the IFCExportConfiguration class which unfortunately is not described in the &lt;A href="https://www.revitapidocs.com/2015/db8ed2bb-8949-7a7f-e09a-29f6c9916f42.htm" target="_blank" rel="noopener"&gt;Revit API&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First we define our document and we create an instance of the&amp;nbsp;IFCExportOptions class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Document doc;
IFCExportOptions IFCExportOptions = new IFCExportOptions();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, import the reference of the IFCExportUI. This is located at the&lt;/P&gt;&lt;P&gt;"C:\Program Files\Autodesk\Revit 2020\AddIns\IFCExporterUI\IFCExportUI.dll"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can now configure the extended IFC Options&amp;nbsp;which are not described in the Revit API but are described in the&amp;nbsp;&lt;A href="https://github.com/Autodesk/revit-ifc" target="_blank" rel="noopener"&gt;IFC Export Revit addin&lt;/A&gt; using the IFCExportConfiguration class.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IFC Export Configurations.jpg" style="width: 898px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/828386i2DE51C13650D934D/image-size/large?v=v2&amp;amp;px=999" role="button" title="IFC Export Configurations.jpg" alt="IFC Export Configurations.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First create an instance of the IFC Export Configuration Class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;BIM.IFC.Export.UI.IFCExportConfiguration myIFCExportConfiguration = BIM.IFC.Export.UI.IFCExportConfiguration.CreateDefaultConfiguration();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then add the required settings in this IFCExportConfiguration. Here I added only the "Export only element visible in view" setting shown at the image below.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Export only element in view.jpg" style="width: 873px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/828388i071D152C9166323A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Export only element in view.jpg" alt="Export only element in view.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;myIFCExportConfiguration.VisibleElementsOfCurrentView = true;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can also apply any other setting that exist in the IFCExportConfiguration class and which are equivalent to the IFC Export User Interface.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IFCExportConfigurationParameters.jpg" style="width: 436px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/828390i27031BDDDC91C429/image-size/large?v=v2&amp;amp;px=999" role="button" title="IFCExportConfigurationParameters.jpg" alt="IFCExportConfigurationParameters.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, we need to pass the options from the IFCExportConfiguration to the IFCExportOptions. Here we need to define a ElementId which refers to a 3D view. however, this is only used is the&amp;nbsp;IFCExportConfiguration.visibleElementsOfCurrentView is set to true. If we don't want to define a 3D view we can also set this to null.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ElementId ExportViewId = null;
myIFCExportConfiguration.UpdateOptions(IFCExportOptions, ExportViewId);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last but not least we define the Directory for the export and we process the export procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;string Directory = @"c:\"
doc.Export(Directory, doc, IFCExportOptions);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below the whole code alltogether.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//Define Document
Document doc;

//Create an Instance of the IFC Export Class
IFCExportOptions IFCExportOptions = new IFCExportOptions();

//Apply the IFC Export Setting (Those are equivalent to the Export Setting in the IFC Export User Interface)
myIFCExportConfiguration.VisibleElementsOfCurrentView = true;

//Create an instance of the IFC Export Configuration Class
BIM.IFC.Export.UI.IFCExportConfiguration myIFCExportConfiguration = BIM.IFC.Export.UI.IFCExportConfiguration.CreateDefaultConfiguration();

//Define the of a 3d view to export
ElementId ExportViewId = null;

//Pass the setting of the myIFCExportConfiguration to the IFCExportOptions
myIFCExportConfiguration.UpdateOptions(IFCExportOptions, ExportViewId);

//Define the output Directory for the IFC Export
string Directory = @"c:\"

//Process the IFC Export
doc.Export(Directory, doc, IFCExportOptions);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope the above are useful. Let me know if anyone has any comment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 19:15:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9789844#M32556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-07T19:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9790956#M32557</link>
      <description>&lt;P&gt;This is awesome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, you saved me a lot of time, because i was about to manipulate the IfcExporter, which i found in my case is not a good solution.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 09:33:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/9790956#M32557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-08T09:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10273816#M32558</link>
      <description>&lt;P&gt;Is there an option to export to ifczip?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 03:09:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10273816#M32558</guid>
      <dc:creator>juan_hoyos4</dc:creator>
      <dc:date>2021-04-28T03:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10274106#M32559</link>
      <description>&lt;P&gt;Please read the IFCExportOptions documentation to answer your question:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.revitapidocs.com/2021.1/b90adabd-0502-fb8f-3a0d-bfa412393f61.htm" target="_blank" rel="noopener"&gt;https://www.revitapidocs.com/2021.1/b90adabd-0502-fb8f-3a0d-bfa412393f61.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I can tell, this functionality is not provided built-in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could implement functionality to capture any output file generated by Revit and zip it, if that fulfils your purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 06:28:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10274106#M32559</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-04-28T06:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10323222#M32560</link>
      <description>&lt;P&gt;Inorder to get access to IFC File type, you have to add one more DLL&amp;nbsp;RevitAPIIFC.dll and this will give access to all IFC file formats.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;myIFCExportConfiguration.IFCFileType = Autodesk.Revit.DB.IFC.IFCFileFormat.IfcZIP; // it has other options as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this worked for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 11:05:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10323222#M32560</guid>
      <dc:creator>strsuraj</dc:creator>
      <dc:date>2021-05-19T11:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10662601#M32561</link>
      <description>&lt;P&gt;Alex,&lt;/P&gt;&lt;P&gt;That is amazing.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;What about setting the File Header Information, Project Adress and Classification settings?&lt;/P&gt;&lt;P&gt;Any chance to define those as well?&lt;/P&gt;&lt;P&gt;I see that in the same dll there's another namespace called BIM.IFC.Export.UI.Properties that contain properties with these names. Can I link these somehow to the IFCExportConfiguration?&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 20:44:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10662601#M32561</guid>
      <dc:creator>H.echeva</dc:creator>
      <dc:date>2021-10-02T20:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10663375#M32562</link>
      <description>&lt;P&gt;Also, I don't see a way to set up the coordinates?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Oct 2021 14:45:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/10663375#M32562</guid>
      <dc:creator>H.echeva</dc:creator>
      <dc:date>2021-10-03T14:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/11341716#M32563</link>
      <description>Hi Josef,&lt;BR /&gt;I'm using 'Autodesk.IFC.Export.UI.dll' from Revit2022 Installation and it's working quite good.&lt;BR /&gt;But a different customer is using Revit 2021 and he get strange exception with missing Method&lt;BR /&gt;'BIM.IFC.Export.UI.IFCExportConfiguration.set_ActivePhaseId(Int32)'&lt;BR /&gt;&lt;BR /&gt;how can i establish Addon which is working for different Revit versions?&lt;BR /&gt;&lt;BR /&gt;thanks Fritz</description>
      <pubDate>Fri, 05 Aug 2022 08:32:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/11341716#M32563</guid>
      <dc:creator>fritz.sandner</dc:creator>
      <dc:date>2022-08-05T08:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/11342958#M32564</link>
      <description>&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2012/07/multi-version-add-in.html" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2012/07/multi-version-add-in.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 19:07:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/11342958#M32564</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-08-05T19:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/11545879#M32565</link>
      <description>&lt;P&gt;Thanks, you saved my day.&lt;/P&gt;&lt;P&gt;if I could add something to help identify the right properties, just create your config in revit then export it in json: properties names are just stored in the file with right values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;{
  "Name": "&amp;lt;Configurazione durante la sessione&amp;gt;",
  "IFCVersion": 21,
  "IFCFileType": 0,
  "SpaceBoundaries": 0,
  "SitePlacement": 0,
  "ActivePhaseId": {
    "IntegerValue": 0
  },
  "ExportBaseQuantities": false,
  "SplitWallsAndColumns": false,
  "ExportInternalRevitPropertySets": true,
  "ExportIFCCommonPropertySets": true,
  "Export2DElements": true,
  "VisibleElementsOfCurrentView": true,
  "Use2DRoomBoundaryForVolume": false,
  "UseFamilyAndTypeNameForReference": false,
  "ExportPartsAsBuildingElements": false,
  "ExportSolidModelRep": false,
  "ExportSchedulesAsPsets": false,
  "ExportUserDefinedPsets": false,
  "ExportUserDefinedPsetsFileName": "C:\\Program Files\\Autodesk\\Revit 2020\\AddIns\\IFCExporterUI\\DefaultUserDefinedParameterSets.txt",
  "ExportUserDefinedParameterMapping": false,
  "ExportUserDefinedParameterMappingFileName": "",
  "ExportBoundingBox": false,
  "IncludeSiteElevation": false,
  "UseActiveViewGeometry": false,
  "ExportSpecificSchedules": false,
  "TessellationLevelOfDetail": 0.75,
  "UseOnlyTriangulation": false,
  "StoreIFCGUID": true,
  "ExportRoomsInView": false,
  "ExportLinkedFiles": false,
  "ActiveViewId": 0,
  "ExcludeFilter": "",
  "COBieCompanyInfo": "",
  "COBieProjectInfo": "",
  "IncludeSteelElements": true,
  "IsBuiltIn": false,
  "IsInSession": true,
  "FileVersionDescription": "IFC 2x3 Coordination View 2.0"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 11:03:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/11545879#M32565</guid>
      <dc:creator>jacopo_chiappetti</dc:creator>
      <dc:date>2022-11-11T11:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12051539#M32566</link>
      <description>&lt;P&gt;Hi Alex!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for this example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/241794"&gt;@jacopo_chiappetti&lt;/a&gt;&amp;nbsp;and Alex,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't been able to find much documentation on using those JSON exports. I'm using IronPython on RevitPythonShell, Revit 2022. I'll share how I'm trying to import this JSON file. It apparently runs, but whenever I try to use the UpdateOptions method it gives a null exception.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import clr
import json
clr.AddReferenceToFileAndPath(r'C:\Program Files\Autodesk\Revit 2022\AddIns\IFCExporterUI\Autodesk.IFC.Export.UI.dll')
import BIM
clr.AddReference('System.Web.Extensions')
from System.Web.Script.Serialization import JavaScriptSerializer
from System.Collections.Generic import Dictionary,IDictionary
from System import DateTime

with open(r'C:\Users\myuser\Downloads\IFCConfiguration.json','r') as f:
	config=json.load(f)
	
myIfcOptions = IFCExportOptions()

myIFCExportConfiguration=BIM.IFC.Export.UI.IFCExportConfiguration()
myIFCExportConfiguration=BIM.IFC.Export.UI.IFCExportConfiguration.CreateDefaultConfiguration()

myIFCExportConfiguration.VisibleElementsOfCurrentView = True

datefromjson=config['ClassificationSettings']['ClassificationEditionDate']
datefromjson.Trim('/')
millisec=int(datefromjson.split('(')[1].split(')')[0])
config['ClassificationSettings']['ClassificationEditionDate']=DateTime(1970,1,1).AddMilliseconds(millisec)

config['ClassificationSettings']=Dictionary[str,object](config['ClassificationSettings'])
config['ProjectAddress']=Dictionary[str,object](config['ProjectAddress'])
config=Dictionary[str,object](config)

serializer = JavaScriptSerializer()
print('Antes:',myIFCExportConfiguration)

myIFCExportConfiguration.DeserializeFromJson(config,serializer)


print('Despues:',myIFCExportConfiguration)

collector = FilteredElementCollector(doc)
views = collector.OfCategory(BuiltInCategory.OST_Views).ToElements()
view = next((v for v in views if v.Name == 'EXPORT - NAVIS'), None)

ExportViewId = view.Id

myIFCExportConfiguration.UpdateOptions(myIfcOptions, ExportViewId)

tr=Transaction(doc,'IFC Export')
tr.Start()
doc.Export("C:/Users/myuser/Downloads",doc.PathName.Split('/')[-1]+'.ifc',myIfcOptions)
tr.Commit()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As it can be seen, I tried cleaning the config json a little bit, but when exploring the properties on the object with the ones on the JSON file, the object is missing ExportMaterialPsets and SelectedSite.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't really been able to export with this JSON.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to see all saved configurations and simply select one? I could use that way since we have that IFC Export configuration saved on all our RVT C4R models.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your insights!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Víctor&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 23:32:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12051539#M32566</guid>
      <dc:creator>victor.bastidas</dc:creator>
      <dc:date>2023-06-21T23:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12057180#M32567</link>
      <description>&lt;P&gt;Just if anyone eeeeever gets to this point of fighting agains the null pointer exception...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It gets created by this line:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Github revit-ifc repo" href="https://github.com/Autodesk/revit-ifc/blob/master/Source/IFCExporterUIOverride/IFCExportConfiguration.cs#L565" target="_blank" rel="noopener"&gt;https://github.com/Autodesk/revit-ifc/blob/master/Source/IFCExporterUIOverride/IFCExportConfiguration.cs#L565&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, whenever this runs:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;case "ActivePhaseId":
if (IFCPhaseAttributes.Validate(ActivePhaseId))
options.AddOption(prop.Name, ActivePhaseId.ToString());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Validate Method in here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;      static public bool Validate(int phaseId)
      {
         ElementId checkPhaseId = new ElementId(phaseId);
         if (checkPhaseId == ElementId.InvalidElementId)
            return false;

         Element checkPhase = IFCCommandOverrideApplication.TheDocument.GetElement(checkPhaseId);
         return (checkPhase != null &amp;amp;&amp;amp; (checkPhase is Phase));
      }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fails, because accessing IFCCommandOverrideApplication.TheDocument gives a None value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can be assigned to the current doc first, but apparently this method has to be used first:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public void OnIFCExport(object sender, CommandEventArgs args)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is under class&amp;nbsp;IFCCommandOverrideApplication.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you've followed up until here, you probably know what you're doing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Else, feel free to shoot me a dm.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all, and have a great day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 22:51:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12057180#M32567</guid>
      <dc:creator>victor.bastidas</dc:creator>
      <dc:date>2023-06-23T22:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12324026#M32568</link>
      <description>I don't get the order of your code.&lt;BR /&gt;&lt;BR /&gt;What's the difference between defining all and my IFCExportConfiguration and the row below where you seem to update IFCExportOptions ... which is a standalone settings.&lt;BR /&gt;&lt;BR /&gt;myIFCExportConfiguration.UpdateOptions(IFCExportOptions, ExportViewId);&lt;BR /&gt;&lt;BR /&gt;//Process the IFC Export&lt;BR /&gt;doc.Export(Directory, doc, IFCExportOptions);</description>
      <pubDate>Mon, 23 Oct 2023 10:37:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12324026#M32568</guid>
      <dc:creator>Joris.vd.Meulen</dc:creator>
      <dc:date>2023-10-23T10:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12446663#M32569</link>
      <description>&lt;P&gt;Can you please share the full implantation. Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2023 16:14:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12446663#M32569</guid>
      <dc:creator>Dinesh.GoswamiQDCPR</dc:creator>
      <dc:date>2023-12-17T16:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/13194753#M32570</link>
      <description>&lt;P&gt;Alex, is it possible to programmatically load a predefined IFC export setup (.json file) and use it to export an .ifc model from Revit through API?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 12:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/13194753#M32570</guid>
      <dc:creator>Marcin_Klocek_JT6V9JKKZG2W</dc:creator>
      <dc:date>2024-12-05T12:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/13194827#M32571</link>
      <description>&lt;P&gt;Follow this code... It's posted here already (check line 10), with a solution to avoid the loading problem in the next comment.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/12051539/highlight/true#M72221" target="_blank" rel="noopener"&gt;Solved: Re: IFC Export Options - Autodesk Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 13:10:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/13194827#M32571</guid>
      <dc:creator>victor.bastidas</dc:creator>
      <dc:date>2024-12-05T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: IFC Export Options</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/13197003#M32572</link>
      <description>&lt;P&gt;I tried to use your approach, but for some reason it does not work. The Python script does run successfully in Dynamo graph, but the resulting IFC file is not as it should be, e.g. the objects (e.g. columns) do not have the BaseQuantities tab under Properties when the IFC file is opened in Navisworks, although&amp;nbsp; &lt;EM&gt;myIFCExportConfiguration.ExportBaseQuantities =&amp;nbsp;True. &lt;/EM&gt;Any idea what may be wrong in my code? The &lt;EM&gt;export_to_ifc&lt;/EM&gt; function starts from line 114.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import clr
import os
import json
import System
from System.IO import Directory, Path

# Add necessary references
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.ApplicationServices import Application
from Autodesk.Revit.UI import TaskDialog

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitAPIIFC")
clr.AddReferenceToFileAndPath("C:\Program Files\Autodesk\Revit 2024\AddIns\IFCExporterUI\Autodesk.IFC.Export.UI.dll")
import BIM

# Get the active Revit document
doc = DocumentManager.Instance.CurrentDBDocument

central_path = doc.GetWorksharingCentralModelPath()
visible_path = ModelPathUtils.ConvertModelPathToUserVisiblePath(central_path)
file_name = Path.GetFileNameWithoutExtension(visible_path)

# Inputs
output_folder = IN[0]  # Folder to save exported files


def create_export_subfolder(base_folder, subfolder_name):
    export_path = os.path.join(base_folder, subfolder_name)
    if not os.path.exists(export_path):
        os.makedirs(export_path)
    return export_path

def export_to_nwc(doc, export_path, view_name="NWC"):
    # Find the 3D view by name for Navisworks export
    views = FilteredElementCollector(doc).OfClass(View).ToElements()
    navisworks_view = None
    for view in views:
        if view.Name == view_name and isinstance(view, View3D):
            navisworks_view = view
            break
    
    if navisworks_view is None:
        TaskDialog.Show("Error", "View named \"" + view_name + "\" not found.")
        return
        
    # Export to Navisworks
    nwc_export_options = NavisworksExportOptions()
    nwc_export_options.ExportScope = NavisworksExportScope.View
    nwc_export_options.ViewId = navisworks_view.Id
    nwc_export_options.ConvertElementProperties = True
    nwc_export_options.ConvertLinkedCADFormats = False
    nwc_export_options.ExportParts = True
    nwc_export_options.ExportRoomAsAttribute = False
    nwc_export_options.ExportRoomGeometry = False
    nwc_export_options.ExportUrls = False
    
    doc.Export(export_path, file_name, nwc_export_options)

def export_to_dwfx(doc, export_path, view_name="NWC"):
    # Get the view or sheet set named 'DWFX export' for DWFX export
    views = FilteredElementCollector(doc).OfClass(View).ToElements()
    DWFX_view = None
    for view in views:
    	if view.Name == view_name and isinstance(view, View3D):
            DWFX_view = view
            view_set=ViewSet()
            view_set.Insert(DWFX_view)
            
            """
            # Access the ViewSheetSetting for the document
            print_mgr = doc.PrintManager
            # print_mgr.SelectNewPrintDriver("Microsoft Print to PDF")
            print_mgr.PrintRange = PrintRange.Select
            
            # Get the ViewSheetSetting object
            view_sheet_setting = print_mgr.ViewSheetSetting
            
            # Create a new ViewSheetSet by providing the document and name
            view_sheet_setting.CurrentViewSheetSet.Views = view_set
            
            # Create a new ViewSheetSet named "DWFX_view_set"
            view_sheet_setting.SaveAs("DWFX_view_set")
            """
            
            break
    
    if DWFX_view is None:
        TaskDialog.Show("Error", "View named \"" + view_name + "\" not found.")
        return
        
    dwfx_export_options = DWFXExportOptions()
    dwfx_export_options.ExportObjectData = True
    dwfx_export_options.MergedViews = False
    dwfx_export_options.ExportingAreas = False
    dwfx_export_options.ExportTexture = True
    # dwfx_export_options.ExportTexture = Lossless
    dwfx_export_options.ExportOnlyViewId = DWFX_view.Id
    
    # Export using the selected view
    doc.Export(export_path, file_name, view_set, dwfx_export_options)

def export_to_ifc(doc, export_path, view_name="IFC"):
    
    views = FilteredElementCollector(doc).OfClass(View).ToElements()
    IFC_view = None
    for view in views:
    	if view.Name == view_name and isinstance(view, View3D):
        	IFC_view = view
         	break
    
    if IFC_view is None:
        TaskDialog.Show("Error", "View named \"" + view_name + "\" not found.")
        return
    
    ifc_export_options = IFCExportOptions()
    myIFCExportConfiguration = BIM.IFC.Export.UI.IFCExportConfiguration()
    myIFCExportConfiguration = BIM.IFC.Export.UI.IFCExportConfiguration.CreateDefaultConfiguration()
 
    # IFC Export Configuration options
    
    #### "General Content" Tab ####
    myIFCExportConfiguration.IFCVersion = IFCVersion.IFCCOBIE
    # myIFCExportConfiguration.ActiveViewId = IFC_view.Id
    myIFCExportConfiguration.SpaceBoundaries = 0
    myIFCExportConfiguration.SplitWallsAndColumns = False
   
    #### "Additional Content" Tab ####
    myIFCExportConfiguration.VisibleElementsOfCurrentView = True
    myIFCExportConfiguration.ExportRoomsInView = False
    myIFCExportConfiguration.Export2DElements = False
    myIFCExportConfiguration.ExportLinkedFiles = 0

    #### "Property Sets" Tab ####
    myIFCExportConfiguration.ExportIFCCommonPropertySets = True	
    myIFCExportConfiguration.ExportBaseQuantities = True
    myIFCExportConfiguration.ExportSchedulesAsPsets = False
    myIFCExportConfiguration.ExportSpecificSchedules = False
    
    #### "Level of Detail" Tab ####
    myIFCExportConfiguration.TessellationLevelOfDetail = 0.5
    
    #### "Advanced" Tab ####
    myIFCExportConfiguration.ExportPartsAsBuildingElements = True
    myIFCExportConfiguration.ExportSolidModelRep = False
    myIFCExportConfiguration.UseActiveViewGeometry = True
    myIFCExportConfiguration.UseFamilyAndTypeNameForReference = True
    myIFCExportConfiguration.Use2DRoomBoundaryForVolume = False
    myIFCExportConfiguration.IncludeSiteElevation = True
    myIFCExportConfiguration.StoreIFCGUID = True
    myIFCExportConfiguration.ExportBoundingBox = False
    
    # Apply the setup configuration
    myIFCExportConfiguration.UpdateOptions(ifc_export_options, IFC_view.Id)
    doc.Export(export_path, file_name, ifc_export_options)

def export_revit_model(base_directory):
    
    # Create subdirectories for NWC, DWF, and IFC exports
    nwc_folder = create_export_subfolder(base_directory, "nwc")
    dwfx_folder = create_export_subfolder(base_directory, "dwfx")
    ifc_folder = create_export_subfolder(base_directory, "ifc")
    
    # Begin transaction for export operations
    TransactionManager.Instance.EnsureInTransaction(doc)
    
    # Export to NWC
    export_to_nwc(doc, nwc_folder)
    
    # Export to DWFX
    export_to_dwfx(doc, dwfx_folder)
    
    # Export to IFC
    export_to_ifc(doc, ifc_folder)
    
    # Commit and end transaction
    TransactionManager.Instance.TransactionTaskDone()
    
    return "success"

OUT=export_revit_model(output_folder)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 12:37:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/ifc-export-options/m-p/13197003#M32572</guid>
      <dc:creator>Marcin_Klocek_JT6V9JKKZG2W</dc:creator>
      <dc:date>2024-12-06T12:37:34Z</dc:date>
    </item>
  </channel>
</rss>

