Unfortunately there is currently no way to set values from WSMLink to an expression. WSMSetValues only takes literals (numbers, booleans and strings). There is also currently no way to redeclare things (which I assume is what you want for the Medium).
We'd like to add this in a future version, but haven't designed how it would work yet.
Today I recommend that you use Model Center for changes like these.
A really bad workaround would be to fetch the Modelica string, make the modifications yourself using string manipulation, and then evaluate the Modelica string. I don't recommend it, but below are the pieces you would need.
Be careful, you can easily destroy your models using this.
str = WSMModelData[model, "ModelicaString"]
(* Do string manipulation here *)
newstr = ...
(* If your model is not on top level you need to prepend a "within A.B.C;" to newstr,
where the A.B.C is the path to the package the model is placed *)
WSMLink`Library`EvaluateModelicaInput[newstr]