swDocMgr GetXmlStream Error

I am unable to create the assembly xml stream with the swDocumentManager "GetXmlStream" method. What am I missing?

I can connect to the document object just fine. Shouldn't this method create the xml file though?

I'm using: http://help.solidworks.com/2016/english/api/swdocmgrapi/SOLIDWORKS.Interop.swdocumentmgr~SOLIDWORKS.Interop.swdocumentmgr.ISwDMDocument~GetXmlStream.html

SolidworksApi macros