Hi, it seems that my Revit Script won’t actually load my IFC Export Options and Property Sets.
I am unable to force Revit to actually load the IFC DLL or something, the exception I got was
”No module named BIM.IFC.Export.UI”
import os
import json
import re
import codecs
import clr
import System
clr.AddReference(“System”)
clr.AddReference(“PresentationFramework”)
clr.AddReference(“RevitAPI”)
clr.AddReference(“RevitAPIIFC”)
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.IFC import *
from System.Windows import MessageBox, MessageBoxButton, MessageBoxImage
from System.Windows.Markup import XamlReader
from System.IO import FileStream, FileMode
from System.ComponentModel import INotifyPropertyChanged, PropertyChangedEventArgs
from System.Collections.ObjectModel import ObservableCollection
from System.Collections.Generic import List
doc = revit.ActiveUIDocument.Document
class ExportWindow(object):
...
...
...
# My Issue starts here #
def _get_advanced_ifc_config(self):
target_name = "RW Export: Nur sichtbares | Pset BT-Liste | Mittel"
try:
from BIM.IFC.Export.UI import IFCExportConfigurationsMap, IFCCommandOverrideApplication
propinfo = clr.GetClrType(IFCCommandOverrideApplication).GetProperty('TheDocument')
propinfo.SetValue(None, doc)
configs_map = IFCExportConfigurationsMap()
configs_map.AddBuiltInConfigurations()
configs_map.AddSavedConfigurations()
for config in configs_map.Values:
if config.Name == target_name: return config
except: pass
return None