Read only checking Macro

Is it possible to check by a macro if any part files are read only in an active assembly document, and then to display their file names in a message box / word pad?

Many thanks

BM

SolidworksApi/macros