Hi all,
Does anyone know where I can find some examples for retrieving monikers (using aaApi_GetProjectMonikers and aaApi_MonikersToStrings) in PW SDK. I'm looking at trying to retrieve a full document/folder path from a document or from the address bar, but having some issues getting it to work.
Regards,
Mark
Give this a try - assumes you have the project and document Id's (LONG lProjectId and LONG lDocumentId)
HMONIKER hMoniker[1];
hMoniker[0] = NULL;
AADOC_ITEM aaItem;
aaItem.lProjectId = lProjectId;
aaItem.lDocumentId = lDocumentId;
BOOL bPassed = aaApi_GetDocumentMonikers(1L,&aaItem,hMoniker);
LPWSTR* ppMonikerStr;
aaApi_MonikersToStrings(1L,hMoniker,&ppMonikerStr,AAMONIKERF_RESOURCE_LOCATION | AAMONIKERF_VISUAL);
//Get the string from *ppMonikerStr, do what you need
//AfxMessageBox(*ppMonikerStr);
aaApi_Free(ppMonikerStr);
ppMonikerStr = NULL;
Please note that I post here on a voluntary basis and am not a Bentley employee.
Answer Verified By: Mark Shamoun
Thanks Jeff, that was exactly what i needed!
OpenRoads Designer 2022 R1 (10.11) | Microstation CE Update 17.2 | ProjectWise CE 3.4