Drawing exists from part or assembly

Is there any way to check if a drawing for a part or assembly already exists?

i.e. If one try’s to create a drawing for a part or assembly and a drawing already exists SW asks you if you would like to open that drawing or create a new one. How do we get this info in the API?

I have searched and found people looking to a drawing file the same file name but have a *.SLDDRW extension but this does not seem to be a great way because the drawing may not have been saved with the same name as the file even though it references the part.

We are running workgroup PDM if that helps but would be best if we can do it while not connected to the network.

SolidworksApi macros