The above method will be the most accurate, however, it should also be quite slow, due to Simulink calling Matlab and Matlab calling CoolProp/REFPROP at each timestep for each block using this. This might be an issue for large Simulink models?
There is also another way of using CoolProp/REFPROP properties in Simulink, and that is by using interpolation in lookup tables:
The documentation does not mention an upper limit for rows and columns in the generated lookup table, so it should be possible to achieve ok accuracy here too? And the solver speed will not be slowed down like above.
There is an example in Simulink called "ssc_refrigeration" that demonstrates the use of such a generated lookup block for two phase fluid properties.