Hi all,
I’m using python to get all valid floor and ceiling types in a project using the GetValidTypes method. This works fine in Iron Python 2.7 in Revit 2022 and Revit 2024, but fails for CPython3 in both versions. The code is pretty basic and is attached.
I get a TypeError warning.
here’s the code for testing
import clr
# Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
collector = FilteredElementCollector(doc).OfClass(ViewPlan).ToElements()
planTypes = (collector[0]).GetValidTypes()
OUT = planTypes
While I’m able to use IronPython currently, I would like to see this resolved moving forwards.
Thanks,
Kevin