Hello,
I'm having the problem that GetViews from the ISwDMDocument10 -13 always returns nothing using the document manager api 2009 sp 4.1
My code looks like the following (C#):
---------------------------------------------------------------------------------
using SwDocumentMgr;
...
private void Run()
{
string sDocFilename;
SwDMDocument10 doc;
Array Views;
SwDmDocumentType nDocType;
SwDMApplication swDocMgr;
SwDMClassFactory swClassFact;
SwDmDocumentOpenError nRetVal;
sDocFilename = @"C:\MySldWorksDrw\mySldDrawing.slddrw"
nDocType = SwDmDocumentType.swDmDocumentDrawing;
swClassFact = new SwClassFactory();
swDocMgr = swClassFact.GetApplication("myKey");
doc = (SwDMDocument10)swDocMgr.GetDocument(sDocFilename , nDocType , false, out nRetVal); //Retval is OK after this line
Views =(Array)doc.GetViews(); //Always returns null
doc.CloseDoc();
}
---------------------------------------------------------------------------------
Tried this snipped with many different drawings, but the GetViews() method always returns null.
Also, when calling GetSheets() I have the same symptom - it returns always null.
Hope somebody can help.
regards Denis.