I’ve experienced this same behaviour as well and couldn’t get around it with the OOTB nodes.
I finally solved it by using some python code.
You can use this:
with the following python code:
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
element = UnwrapElement(IN[0])
ref_level = UnwrapElement(IN[1])
TransactionManager.Instance.EnsureInTransaction(doc)
for i,x in enumerate(element):
ref_levelid = ref_level[i].Id
object_param_level = x.get_Parameter(BuiltInParameter.FAMILY_LEVEL_PARAM)
object_level = doc.GetElement(object_param_level.AsElementId())
object_param_level.Set(ref_levelid)
TransactionManager.Instance.TransactionTaskDone()
OUT = element