# Column is placed on wrong level

**URL:** <https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046>\
**Category:** Revit\
**Tags:** python, cpython3\
**Created:** [March 31, 2022, 6:54pm UTC](https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046 "2022-03-31T18:54:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wouter.hilhorst](https://avatars.discourse-cdn.com/v4/letter/w/779978/32.png) [@wouter.hilhorst](https://forum.dynamobim.com/u/wouter.hilhorst)\
**Post date:** [March 31, 2022, 6:54pm UTC](https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046/1 "2022-03-31T18:54:29Z")

</div>

Hi,  
I`m converting a script from ironpython 2.7 to 3. In 2.7 everything works fine but in 3 it seems that some Revit API methods are behaving different. The aim is to create colums. The error is: `instance of a level based family cannot be created without a valid revit level`  
It seems that the XYZ is in the correct place, also the level is right (see below prinscreen), but the column is placed on the level below. This generates the error, but I dont really understand why it is placing the column below the level. The blue line is the column which is placed below the level it should be (level 1). If I turn the detail level on fine the column is not showing. It only seems visible on coarse detail level.

```auto
TransactionManager.Instance.EnsureInTransaction(doc)
					
TEMP.append([Level_Rvt])
				
Kolom = doc.Create.NewFamilyInstance(XYZ(Punt.X/304.8,Punt.Y/304.8,Punt.Z/304.8), Kolom_Rvt, Level_Rvt, Structure.StructuralType.Column)
					
TransactionManager.Instance.TransactionTaskDone()

```

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/a/0a0e8d0abb571fd1ad96bc34427583f5adcbd501.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/1/31bed979b57ae0f6b8a2bda83080f84ed57e0589.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2dcaae4fb0b5dfe5156f79c1a845088fc6a98639.png)

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [March 31, 2022, 8:52pm UTC](https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046/3 "2022-03-31T20:52:33Z")

</div>

This seems to be related to the unsupport of .Net Enums with PythonNet 2.5

> **[Work in progress to improve Python 3 support · DynamoDS/Dynamo Wiki](https://github.com/DynamoDS/Dynamo/wiki/Work-in-progress-to-improve-Python-3-support#net-enums-are-returned-as-integers-from-python-not-planned)**
>
> Open Source Graphical Programming for Design. Contribute to DynamoDS/Dynamo development by creating an account on GitHub.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/8/a8ed5aca612885cded21e7e7282e14edd68937b8.png)

the overload resolution seem lost 🙃

---

<div class="post-metadata">

**Author:** ![wouter.hilhorst](https://avatars.discourse-cdn.com/v4/letter/w/779978/32.png) [@wouter.hilhorst](https://forum.dynamobim.com/u/wouter.hilhorst)\
**Post date:** [March 31, 2022, 9:31pm UTC](https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046/5 "2022-03-31T21:31:08Z")

</div>

I`ve tried to unwrap it and change the XYZ coordinates but it keeps giving the same error.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [March 31, 2022, 10:52pm UTC](https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046/6 "2022-03-31T22:52:16Z")

</div>

@c.poupin cought what I didn’t and that was that I changed to CP3 but didn’t save it before running. I was not successful either.

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [April 1, 2022, 10:50am UTC](https://forum.dynamobim.com/t/column-is-placed-on-wrong-level/75046/7 "2022-04-01T10:50:59Z")

</div>

> [@wouter.hilhorst](#):
>
> Any ideas?

No,  
the future version of PythonNet (3.0) which should solve the Net Enums problem.  
Currently, (PythonNet 2.5.x) Net Enum return an integer

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/6/26d377860dd16bd97f9ecf19b3ae9198e0052e17.png)
