I suggest to visit my website: www.sim2lab.com
Here you can find SIM2LAB Blockset that is a good solution for generate C-code for dsPIC microcontrollers, starting from a Simulink model.
The MPLAB file is automatically generated by the blockset and the file included in the project.
Visit my website for further details and download your evaluation copy.