Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi i am trying to export a revit 2016 file to ifc.
import clr
import math
import os
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.DB import *
app = __revit__.Application
doc = __revit__.ActiveUIDocument.Document
uidoc = __revit__.ActiveUIDocument
revitPath = doc.PathName
ifcPath = revitPath.replace("rvt","ifc")
splitted = ifcPath.split("\\")
ifcFile = splitted[-1]
filelength = len(ifcFile)
nudePath = ifcPath[:filelength*(-1)]
ifcName = ifcFile.replace(".ifc","")
views = ViewSet()
view = uidoc.ActiveView
views.Insert(view)
ifcOptions = IFCExportOptions()
ifcOptions.FileVersion = IFCVersion.IFC2x3
ifcOut = doc.Export(nudePath, ifcName, views, ifcOptions)
actually the code is straightforward according to revit API documentation Document.Export Method(String, String, IFCExportOptions).
so far so good. the code is running but giving me following error:
how can i avoid the expectation of FBXExportOptions????
Solved! Go to Solution.