kbandela
Computer
- Aug 4, 2015
- 5
I am writing a plugin where I need to read the publications under a product
I am able to read the publication names using this code.
CATIProduct_var spProductInst = GetProductInstance();
CATIPrdObjectPublisher_var piPublisher = NULL_var;
HRESULT hr = spProductInst->QueryInterface(IID_CATIPrdObjectPublisher, (void**)&piPublisher);
CATListValCATUnicodeString* pPublicationsList = NULL;
int publicationCount = piPublisher->ListPublications(pPublicationsList);
However, I need to get the actual point and plane object that was published. I tried out the GetDirectObject and GetFinalObject methods, but they are not providing the published objects.
If anyone can point me to the API that will be of great help
Thanks in advance

I am able to read the publication names using this code.
CATIProduct_var spProductInst = GetProductInstance();
CATIPrdObjectPublisher_var piPublisher = NULL_var;
HRESULT hr = spProductInst->QueryInterface(IID_CATIPrdObjectPublisher, (void**)&piPublisher);
CATListValCATUnicodeString* pPublicationsList = NULL;
int publicationCount = piPublisher->ListPublications(pPublicationsList);
However, I need to get the actual point and plane object that was published. I tried out the GetDirectObject and GetFinalObject methods, but they are not providing the published objects.
If anyone can point me to the API that will be of great help
Thanks in advance