Hi,
instead of setting the level *property*, you could try to set the level *parameter*.
Depending on the type and category of the element you want to modify, you could set the BuiltInParameter.FAMILY_LEVEL_PARAM (for FamilyInstances), for example.
Use RevitLookup to get the level parameters for other kinds of elements.
Level params usually are set with an ElementId:
http://thebuildingcoder.typepad.com/blog/2011/01/family-instance-missing-level-property.html
Best regards,
Revitalizer