Announcements
Notice: Upload of PDF documents is currently unavailable across the Community due to an ongoing issue.

export IFC revit 2016

export IFC revit 2016

office
Enthusiast Enthusiast
794 Views
1 Reply
Message 1 of 2

export IFC revit 2016

office
Enthusiast
Enthusiast

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:

bild.png

how can i avoid the expectation of FBXExportOptions????

 

0 Likes
Accepted solutions (1)
795 Views
1 Reply
Reply (1)
Message 2 of 2

office
Enthusiast
Enthusiast
Accepted solution

solved!

IFC Export does not require "views"

0 Likes