Hi @paliitali, you can edit the family by unchecking Work Plane Based parameter.
From there you can use the Level parameter as you would with any other parameter and change its value.
The only downside of using Level to Work Plane Based is that you won’t be able to host your family to a custom work plane that you create, as work planes can be at any angle you specify, levels can only be completely flat.
In the example I used an existing level named IT4 - LEVEL 38 and used this string value to override an element hosted on level IT4 - LEVEL 39 which in turn changed the parameter value and the hosted level of the element.
Notice that Element.SetParameterByName will require a parameter of a type Element which is a level rather than a string value.