Hi
There seems to be an issue with loading the Autodesk.Revit.DB.ExportUtils class when using CPython.
Everything works fine under Ironpython, but with CPython the class isn’t recognised.
Is this a bug or do I need to be doing something different with CPython?
Many thanks for your consideration
#--------------- REFERENCES START ---------------
Enable Python ‘Common Language Runtime’ (.NET) support
import clr
Load Revit API
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Architecture import *
from Autodesk.Revit.DB.Electrical import *
from Autodesk.Revit.DB.Mechanical import *
from Autodesk.Revit.DB.Plumbing import *
from Autodesk.Revit.DB.Structure import *
from Autodesk.Revit.DB.ExportUtils import *
#--------------- REFERENCES START ---------------
#Enable Python ‘Common Language Runtime’ (.NET) support
import clr
#Load Revit API
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Architecture import *
from Autodesk.Revit.DB.Electrical import *
from Autodesk.Revit.DB.Mechanical import *
from Autodesk.Revit.DB.Plumbing import *
from Autodesk.Revit.DB.Structure import *
from Autodesk.Revit.DB.ExportUtils import *
OUT = "done"
I appreciate the response, but I have tried this on a work and personal computer on Revit 2023 and the result is the same for both, so I really do think there is an issue with this. Does anybody else have any ideas as to why?
@christian.stan That has sorted the problem. Knew it had to be something fundamentally simple.
Imported ‘Autodesk.Revit.DB’ and then prefixed the method in the code I’m working on with ‘ExportUtils.’ and all now functions fine under CPython. Massive thanks for your input.