I have a function I'm calling through a menu in PWE, trying to get a Select Document dialog to appear. I've tried aaApi_SelectDocumentDlg and aaApi_SelectDocumentDlg2, neither will fire. When I check the last error, the code is 3 (equivalent to IDABORT I think) and the error text is "Cannot display dialog".
Here is the chunk of code I'm using that doesn't work. I suspect the problem is in the output vars but I have had no luck with trying other type defs, pointers, references, etc.
I'm hoping someone can point out the problem. Thanks.
LPLONG lplProjectId = NULL; LPLONG lplDocumentId = NULL; HWND hWndParent = aaApi_GetActiveDocumentList(); LONG lSelectedDocumentDlgResult = aaApi_SelectDocumentDlg2 (hWndParent,NULL,NULL,AADOCSELDF_PROPERTYMENU,0,lplProjectId,lplDocumentId);
Thanks, that did the trick. I didn't include the code that processes the output of the lplProjectId and lplDocumentId vars in this post just to keep the post shorter and on point.
Please note that I post here on a voluntary basis and am not a Bentley employee.