Change the revit family parameter depend on the element ID?

Credit to @Einar_Raknes and Convert Double to Integer

Put a codeblock with x:int[]; between List.FirstItem and Select.ByElementId. See if it works.