How to check if a drawing is detached

When saving a drawing, you can either save as a Drawing or Detached Drawing.  My AddIn needs to know which type is currently open.

Does anyone know of a way to ask if a drawing document (DrawingDoc) is attached or detached?  I can't seem to find anything in the help or the forums about this.

Thanks!

SolidworksApi macros