C# How to check if a part or an assembly has a drawing?

Hi there,

I want to check if a part or an assembly has a drawing. It should be something like when I have a part opened and I choose, 'Make drawing from Part/Assembly' Solidworks checks if there is a drawing for that part present. I think I have to look, when part 001001.sldprt is opened, if 001001.slddrw exists in the directory from the part. The code should return 1 when it doesn't exists and a 0 when it does.

Regards

SolidworksApi macros