CPython not loading ExportUtils Class

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 *

OUT = ‘done’

@dsnook ,

i could not find an issue

#--------------- 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 tested in 2022 as CPython


KR
Andreas

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?

Hello, ExportUtils is a class from the DB domain already imported in the 1st line


that’s why I got the error message edit

Cordially
christian.stan

1 Like

@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.

1 Like