I am running SolidWorks 2018 x64 Education Edition under Windows 10. And I have already created a C++ SW COM Non-Attributed Add-in project in Visual Studio 2015 Professional successfully . I would like to use the "IGetSpecificAnnotation( )" to get the specific underlying object associated with this annotation. I had write source code nearly as follows:
CComPtr<IAnnotation> pAnn;
CComPtr<IDisplayDimension> pAnnDisplayDimension;
CComPtr<IUnknown> pUn;
pUn->QueryInterface(IID_IDisplayDimension, reinterpret_cast<void**>(&pAnnDisplayDimension));
pAnn->IGetSpecificAnnotation(&pUn);
I wonder how to show and fetch the displayed dimensions and tolerances in the part,assembly or drawing document. Any tips or reply would be greatly appreciated!