Cannot programmatically read .sldmat file

Hi all,

I'm trying to read the property name of a custom material.

I found that there is no API to do so. The only way to do is to read the .sldmat file (e.g. C:\ProgramData\SolidWorks\SolidWorks 2014\Custom Materials\Custom Materials.sldmat).

Unfortunately, there is no way to read that file using C++ functions.

This file can be opened in text pad, note pad, etc.... but I cannot programmatically read it.

For example, I tried:

File *fp = fopen(sldmat path, "r");

while (fgets(buffer, buffer_size, fp) != NULL)

{

     buffer is empty here

}

Anyone got the same problem, any idea?

Thanks

SolidworksApi macros