DrAmine
Ansys Employee

Well I can change the diamter of my unsteandy injection with the DEFINE_DPM_INJECTION_INIT after setting the Mass and Diameter (PP_MASS, PP_DIAM and the init versions of them).

Can you tell us how is your injection defined? 

Why not first getting confidence in the UDF and try with surface injecton just simple setting another diameter to the one you put in the GUI: with that you verify if the Macro is working for you.