Welcome in the forum!
The function I2C_1_MasterWriteBuf() returns a status which is zero when success. Otherwise there will be returned a value indicating the cause. See in i2c_1.h - file for the #defined constants.
There is no need to ADC_StartConvert() and StopConvert() within the infinite loop, it would be faster just waiting for a conversion ready, everything is handled within the API.
Next time do not post only a code snippet, but your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
So, i've added some error checking and it works as expected. I think the problem is the value i'm writing to the I2C DAC. With the I2C_1_MasterWriteBuf() command do I have to include start bits etc? The DAC is a MCP4725, a DAC which has been used in a pervious discussion but i'm confused by their resolution to the problem.
yes, I'm just confused by the masterbuffer function but think i'm starting to understand it with the help of the other threads source code.