# CPython not loading ExportUtils Class

**URL:** <https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892>\
**Category:** Developers\
**Tags:** python, dynamo\
**Created:** [June 19, 2023, 12:47pm UTC](https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892 "2023-06-19T12:47:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsnook](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dsnook](https://forum.dynamobim.com/u/dsnook)\
**Post date:** [June 19, 2023, 12:47pm UTC](https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892/1 "2023-06-19T12:47:27Z")

</div>

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.

 ![ExportUtils_Ironpython](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/5/3508b76ce1ba9bce70651936f356d4e64066e47d.png)  
 ![ExportUtils_CPython](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/7/272d4d16de66eca2d902ae32c8fc269dc3074b68.png)

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’

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 19, 2023, 1:28pm UTC](https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892/2 "2023-06-19T13:28:19Z")

</div>

@dsnook ,

i could not find an issue

```auto
#--------------- 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

 ![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/7/67ed742da3b10b87e7bfa7d171e227569486393e.png)  
KR  
Andreas

---

<div class="post-metadata">

**Author:** ![dsnook](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dsnook](https://forum.dynamobim.com/u/dsnook)\
**Post date:** [June 21, 2023, 9:05am UTC](https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892/3 "2023-06-21T09:05:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [June 21, 2023, 9:30am UTC](https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892/4 "2023-06-21T09:30:06Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2ff8c089c1afe6bc79eb430f7bbc5594689cff83.png)  
that’s why I got the error message edit  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/d/9d852903aca307072d4178b84561215474f1f32a.png)  
Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![dsnook](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dsnook](https://forum.dynamobim.com/u/dsnook)\
**Post date:** [June 21, 2023, 10:12am UTC](https://forum.dynamobim.com/t/cpython-not-loading-exportutils-class/90892/5 "2023-06-21T10:12:53Z")

</div>

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