I'm having the same issue, when referencing a user parameter inside a 'createByString' function, it's "flattened". The expression is computed correctly, but when I open the extrude feature from the timeline, the value it's extruded by is simply the result of the expression. I would expect it to function the same way as from inside the GUI, where you type 'Playfield_thickness - 0.25 in' into a value input, the reference is saved and updates to the parameter are reflected in the feature.
For example, here's a snippet of the code I'm using for my extrude:
param_playfield_thickness_value = adsk.core.ValueInput.createByString("0.5 in")
design.userParameters.add("Playfield_thickness", param_playfield_thickness_value, "in", "The thickness of the playfield")
# ...
second_extrude_depth = adsk.core.ValueInput.createByString('Playfield_thickness - 0.25 in')
second_extrude = extrudes.addSimple(shelf_profile, second_extrude_depth, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
When 'Playfield_thickness' = 0.5 in, the extrude feature in the timeline simply lists 'Distance' as 0.25.
Surely I'm using the parameter wrong? Otherwise it seems like this is a decent bug/oversight in the API?
Kyle