# Export IFC/NWC with saved config

**URL:** <https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134>\
**Category:** Uncategorized\
**Created:** [July 29, 2024, 7:44pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134 "2024-07-29T19:44:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [July 29, 2024, 7:44pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/1 "2024-07-29T19:44:33Z")

</div>

Does anyone know if it’s possible to use the Export IFC/NWC nodes but instead of filling in all the export options, i simply choose a saved export setup, like with the Export DWG node?

Tagging @Alban_de_Chasteigner since im using your nodes 🙂

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/5/650ade5e59820ab4ea77e181dc7e7ce478bbed3a.png)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [July 29, 2024, 10:03pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/2 "2024-07-29T22:03:51Z")

</div>

Hi @Garbage_Collector,

There is a [ExportDWGSettings](https://apidocs.co/apps/revit/2024/a17fc52f-f67a-9763-e52f-29f867106908.htm) class in the API but I can’t see a ExportIfcSettings or a ExportNWCSettings.  
You could store your settings in a text format and read them when needed on the fly.

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [July 29, 2024, 10:13pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/3 "2024-07-29T22:13:26Z")

</div>

Ahh ok ill try that then 🙂  
While i have you here,  
Is there a reason why the IFC export node doesnt have a runIt input? Can i toggle this node another way to prevent it from running?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 29, 2024, 10:17pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/4 "2024-07-29T22:17:55Z")

</div>

This class might be relevant, but I am not sure it has what you need.

> **[IFCExportOptions Class](https://www.revitapidocs.com/2024/db8ed2bb-8949-7a7f-e09a-29f6c9916f42.htm)**
>
> Online Documentation for Autodesk's Revit API: 2015, 2016, 2017, 2017.1, 2018

As the content doesn’t save to the file (as best I know) you likely will want to serialize the settings into an external data source (perhaps even into the .dyn itself), or perhaps save it into extensible storage somewhere.

Edit: the NWC export settings class is here: [NavisworksExportOptions Class](https://www.revitapidocs.com/2024/a58dbe71-1be7-dad6-51b6-5386c162cf87.htm)

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [July 29, 2024, 10:23pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/5 "2024-07-29T22:23:51Z")

</div>

I was looking for these:  
NWC  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/c/dc3fa1770549ecdacee869021c01f55696fe32e4.png)

IFC:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/6/86653965e1872204f53bcc8a97a71d18a02a5dbf.png)

Especially the IFC settings have so many variables… I was hoping for a way to let the user manually export these settings once for a project and then target the export settings with a filepath input. Ill look into the classes, although i fear it is over my head since i’d have to change Alban’s node a lot…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 29, 2024, 10:31pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/6 "2024-07-29T22:31:42Z")

</div>

Yes - I don’t believe the saved settings are available via the API. They may be in a class that isn’t readily exposed, but getting the ‘right one’ once saved is tough.

The good thing with the external file is you can read say a JSON with the input values (strongly json to format a list as a JSON before writing to a text document, and parse json to read the string into a usable format) which can then be fed directly into Alban’s nodes. No changes required. 😊

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [July 29, 2024, 10:46pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/7 "2024-07-29T22:46:09Z")

</div>

Thank you very much 🙂 I’ll try this out and hopefully end up with a good batch IFC/DWG/NWC 3D view exporter 🕶  
Will report back!

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [July 30, 2024, 7:48pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/8 "2024-07-30T19:48:54Z")

</div>

Hi,

for IFC, here is a workaround with **BIM.IFC.Export.UI** namespace to retrieve project user configurations

see here _(use the translation widget on my blog)_

> **[\[Dynamo += Python\] Export IFC : configurations Utilisateur](https://voltadynabim.blogspot.com/2024/04/dynamo-python-export-ifc-configurations.html)**
>
> Blog sur le BIM, du Python et d'la Dynamo appliqués aux électrons

for Navisworks I didn’t study yet to know if it was possible

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [July 31, 2024, 11:56am UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/9 "2024-07-31T11:56:57Z")

</div>

This is awesome!

Only when using Albans node, it still skips a ton of settings defined in the preconfigured settings no? A bunch of settings have been hard coded/omitted in his Python script if i fecal correctly (not at computer now).

If I wanted to use every variable in the saved settings I’d have to change the code for Albans node right?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [July 31, 2024, 8:50pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/10 "2024-07-31T20:50:07Z")

</div>

HI,

Yes you can edit the python node to add other inputs.  
I prefer to avoid custom nodes with too many inputs.

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [August 1, 2024, 6:56pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/11 "2024-08-01T18:56:25Z")

</div>

Not really related but im having trouble displaying whatever comes out of the python script for some reason…

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aa017fa26e50bdabd3d4ba6e7bf8c473ca841e15.png)

Im unable to see whats inside the dict and cant scale my watch nodes (im on revit 2023, dynamo 2.16

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/6/e6cf47ec2369ea79516781bc30a52a3bb9ca7f30.png)  
@jacob.small Do you know why my nodes arent displaying the data correctly?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 1, 2024, 7:40pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/12 "2024-08-01T19:40:27Z")

</div>

> [@Garbage\_Collector](#):
>
> Do you know why my nodes arent displaying the data correctly?

Usually because the data in the node doesnt have a wrapper to a Dynamo type or is otherwise un-watchable. Outputting some types of Python dictionaries, or Revit elements without converting to a Dynamo element can cause this.

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [August 5, 2024, 7:35pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/13 "2024-08-05T19:35:20Z")

</div>

Hi @Alban_de_Chasteigner

I have altered your node to also accept an IFC config extracted from the current document with the help of @c.poupin 's post.

Perhaps you could absorb it into your version if you agree with the changes… I’ve added comments wherever i made changes.

It accepts an optional ifcExportConfig, if it’s provided, it will set all the options based on the config instead of the hard coded and optional user input.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/e/8e8fb5e6a868c75e7fc7faca71f5e73d82c8655d.png)

```auto
#Based on a Nicklas Verdier Østergaard's script, nvo@niras.dk
#https://github.com/Autodesk/revit-ifc/tree/2810c479e27819da97656759a1dda28cbdde0538/Source
#Revised by Alban de Chasteigner

import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

def tolist(obj1):
    if hasattr(obj1," __iter__"): return obj1
    else: return [obj1]
#REMARK: Added this function to find IFC versions instead of if checks
def get_ifc_version(version_str):
    return {
        "IFC4": IFCVersion.IFC4,
        "IFC4RV": IFCVersion.IFC4RV,
        "IFC4DTV": IFCVersion.IFC4DTV,
        "IFC2x2": IFCVersion.IFC2x2,
        "IFC2x3": IFCVersion.IFC2x3,
        "IFC2x3CV2": IFCVersion.IFC2x3CV2,
        "IFC2x3BFM": IFCVersion.IFC2x3BFM,
        "IFC2x3FM": IFCVersion.IFC2x3FM,
        "IFCBCA": IFCVersion.IFCBCA,
        "IFCCOBIE": IFCVersion.IFCCOBIE,
        "": IFCVersion.Default
    }.get(version_str, IFCVersion.Default)
    
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

folder=UnwrapElement(IN[0])
view = tolist(UnwrapElement(IN[1]))
name=tolist(UnwrapElement(IN[2]))
fileversion = IN[3]
Projectorigin = IN[4]
inputPhase = UnwrapElement(IN[5])
userDefinedPset = IN[6]
revitInternalPset = IN[7]
wallandcolumnsplitting = IN[8]
exportbasequantities = IN[9]
config = IN[10]
test = ""

if inputPhase != None:
    phaseString=str(inputPhase.Id)
else:
    pass

if userDefinedPset != "":
    userDefPsetBool= "true"
else:
    userDefPsetBool= "false"

if revitInternalPset ==True:
    revitInternalPset= "true"
else:
    revitInternalPset= "false"

TransactionManager.Instance.EnsureInTransaction(doc)
result = []

for i,v in enumerate(view):
    options=IFCExportOptions()
    #REMARK: Added if check to pass this part if a config is provided.
    if config == None:
    	
    	#REMARK: Removed IF checks for IFC version and moved it to the get_ifc_version function
        options.FileVersion = get_ifc_version(fileversion)
            
        options.WallAndColumnSplitting = wallandcolumnsplitting
        options.ExportBaseQuantities = exportbasequantities
        options.FilterViewId = v.Id
        options.AddOption("ExportInternalRevitPropertySets",revitInternalPset)
        options.AddOption("ExportIFCCommonPropertySets","true")    
        options.AddOption("ExportAnnotations ","true")
        options.AddOption("SpaceBoundaries ", "0")
        options.AddOption("ExportRoomsInView", "false")    
        options.AddOption("Use2DRoomBoundaryForVolume ", "true")
        options.AddOption("UseFamilyAndTypeNameForReference ", "true")
        options.AddOption("Export2DElements", "false")
        options.AddOption("ExportPartsAsBuildingElements", "false")
        options.AddOption("ExportBoundingBox", "false")
        options.AddOption("ExportSolidModelRep", "true")
        options.AddOption("ExportSchedulesAsPsets", "false")
        options.AddOption("ExportSpecificSchedules", "false")
        
        #True doesn't work. It would be necessary to use OpenInBackground method.
        options.AddOption("ExportLinkedFiles", "false")
        
        options.AddOption("IncludeSiteElevation","true")
        options.AddOption("StoreIFCGUID", "true")
        options.AddOption("VisibleElementsOfCurrentView ", "true")
        options.AddOption("UseActiveViewGeometry", "true")
        options.AddOption("TessellationLevelOfDetail", "0,5")
        options.AddOption("ExportUserDefinedPsets",userDefPsetBool)
        if userDefinedPset != "":
            options.AddOption("ExportUserDefinedPsetsFileName",userDefinedPset)    
        else:
            pass
        if inputPhase != None:
            options.AddOption("ActivePhase", phaseString)
        else:
            pass
        options.AddOption("SitePlacement", IN[4])    
    # options.AddOption("ClassificationName","x")
    # options.AddOption("ClassificationFieldName","x")
#REMARK: Added this part. If config exists, we set all values based on the config. The standard options are set first, and then all additional options in the dict are added.
    if config:
    	options.FilterViewId = v.Id

    	for key, value in config.items():
			if key == "IFC_Version_str":
				options.FileVersion = get_ifc_version(value)
			elif key == "ExportBaseQuantities":
				options.ExportBaseQuantities = value
			elif key == "WallAndColumnSplitting":
				options.WallAndColumnSplitting = value
			else:
				options.AddOption(key, str(value))

    c=doc.Export(folder, name[i], options)
    result.append(c)

# End Transaction
TransactionManager.Instance.TransactionTaskDone()

if fileversion == "":
    OUT="Default settings used"
else:
    OUT= "Success"

```

Perhaps you or @c.poupin could also create a custom node to get an IFC export setting by name, im currently just letting the user select the name and then use that key to get its values with data shapes which then get fed into the ifc export node.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/8/f8ef9d06e6306173d2ea582acb49985fbe066568.png)

---

<div class="post-metadata">

**Author:** ![nmcmahonTW94C](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nmcmahonTW94C](https://forum.dynamobim.com/u/nmcmahonTW94C)\
**Post date:** [October 28, 2025, 12:30pm UTC](https://forum.dynamobim.com/t/export-ifc-nwc-with-saved-config/103134/15 "2025-10-28T12:30:23Z")

</div>

I’m trying to impliment this too. But I think I am missing something. I get this warning in revit 2025

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/1/112b3f9de678e6fd7a59c9e4c8eb787f8b056b2e.png)

Not sure about the directory paths that it’s configured for this one seems correct this tallies with my location “C:\Program Files\Autodesk\Revit 2025\AddIns\IFCExporterUI” but the path to the bundle doesn’t exist on mine system.

I wouldn’t mind in using an exported json file. But not sure how to parse this and input into the genius loci IFC export node
