Did you run the build again after running the set_param? The function is called by the build process and is not invoked immediately after the set_param.
(Also, not sure if you have a typo, but 'PostCodeGenCommand' must be within single quotes in your command)