data type handling from Revit 2022 to 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
def PBE(_Doc, _PN, _PT):
_Bindg = _Doc.ParameterBindings
_i = _Bindg.ForwardIterator()
_i.Reset()
while _i.MoveNext():
if _i.Key != None and _i.Key.Name == _PN and _i.Key.GetDataType == _PT:
return True
return False
_PN = "Sampel"
_PT = ForgeTypeId.GetType(SpecTypeId.String.Text)
OUT = PBE(_Doc, _PN, _PT)
Revit 2022:
_Txt = System.Enum.GetValues(ParameterType)[1]
_Area = System.Enum.GetValues(ParameterType)[5]
_Nmbr = System.Enum.GetValues(ParameterType)[3]
_Bool = System.Enum.GetValues(ParameterType)[10]
_Int = System.Enum.GetValues(ParameterType)[2]
_Lngth = System.Enum.GetValues(ParameterType)[4]
Revit 2023:
_Txt = ForgeTypeId.GetType(SpecTypeId.String.Text)
_Area = ForgeTypeId.GetType(SpecTypeId.Area)
_Nmbr = ForgeTypeId.GetType(SpecTypeId.Number)
_Bool = ForgeTypeId.GetType(SpecTypeId.Boolean.YesNo)
_Int = ForgeTypeId.GetType(SpecTypeId.Int.Integer)
_Lngth = ForgeTypeId.GetType(SpecTypeId.Length)
How can I update the data type handling in my PBE method from Revit 2022 to Revit 2023
Thanks in advance