Revit2023 dynamo error.. forgetypeid vs unittypeid?

in revit2021 dynamo… there is no error
but in revit2023 dynamo… below - error…

how can i fix below error message…
thank you

I assume it is related to this post.

Thank you for your reply…

I changed dynamo node to Python Script…
after that error is disappeared…

Below is Dynamo and… My Python Script…

Load the Python Standard and DesignScript Libraries

import sys
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

clr.AddReference(‘RevitServices’)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

TransactionManager.Instance.EnsureInTransaction(doc)

#Select element from revit.

def set_parameter_by_name(element, parameterName, value):
element.LookupParameter(parameterName).Set(value)

lst0 = UnwrapElement(IN[0])
lst1 = IN[1]
lst2 = IN[2]

#Start Transaction

for lvl2, val2 in enumerate(lst0):
for lvl1, val1 in enumerate(lst0[lvl2]):
#Set a new Comment
set_parameter_by_name(val1, lst1, lst2)

TransactionManager.Instance.TransactionTaskDone()

OUT = lst0

  • But I don’t know Element.SetParameterByName node error… :slightly_smiling_face:

Thank you