Documents Class API GetItemByName throws exception for Simplified Part.

Documents Class API GetItemByName throws exception for Simplified Part.

Anonymous
Not applicable
474 Views
0 Replies
Message 1 of 1

Documents Class API GetItemByName throws exception for Simplified Part.

Anonymous
Not applicable

I am trying to get the document pointer from Documents interface. I am calling GetItemByName API to get the pointer. However this method throws an exception and did get document pointer.

 

Please refer the following code snipet below:

 

DocumentsPtr pDocs;
pDocs = pINVApplication->GetDocuments();

CATBSTR bstrFullPath;
Identifier.ConvertToBSTR(&bstrFullPath);

FileManagerPtr pFM = pINVApplication->GetFileManager();
BSTR strlastLOD;
hr = pFM->GetLastActiveLevelOfDetailRepresentation(_bstr_t(bstrFullPath), &strlastLOD);
pFM->GetFullDocumentName(_bstr_t(bstrFullPath), strlastLOD, &bstrFullPath);

pRetDoc = pDocs->GetItemByName(_bstr_t(bstrFullPath)); //This method fails and throws exception.

 

This is just sudo code. Could some one please help me with this. Thanks in advance.

0 Likes
475 Views
0 Replies
Replies (0)