Hi All,
I am a new developer in PW area. Recently I encountered a problem as my title said. I have a flat set which I know its projectid and docmentid, I tried to use aaApi_GetSetIdsByMasterDoc but not success. Who can give me an example for this function? Or another function to do this?
Thanks, Xue
I know it is an old topic, but in case it might be useful, here is a code snippet to retrieve the first set id of a logical set (if it exists) using aaApi_GetSetIdsByMasterDoc :
long getLSetIdFromMasterDoc(long lProjectId, long lDocumentId) { long nbDocs; LPAASETIDINFO pIdInfo; unsigned long type = 0; if (aaApi_GetSetIdsByMasterDoc(lProjectId, lDocumentId, AADMS_MASTER_LOGICAL, nullptr, -1, &nbDocs, &pIdInfo, &type) ) { if (nbDocs > 0) return pIdInfo->lSetId; } return -1; }
For some reason, the aaApi_SelectDocument / aaApi_GetDocumentNumericProperty(DOC_PROP_SETID ) was not working for me...