Column is placed on wrong level

Hi,
Im 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.

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()


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

the overload resolution seem lost :upside_down_face:

1 Like

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

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

1 Like

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