I would be very careful about using known commands as variable names, things like Family = and level = as it can conflict with the commands using the same name. Start by changing the variable names into something more unique.
Another problem seems to be conflicting types between the Revit element Level and the Dynamo element Level. You are collecting the Revit element Level through the doc but the Dynamo command StructuralFraming.BeamByCurve() wants the Dynamo version. I think the command for that is .ToDSType()
Hi, mate. Your work looks very impressive. May I ask do you know how to use StructuralFraming.ColumnByCurve in Python? Should I make some change on the “level”?