Hello,
I have set the tracking ID to the output body of the macro feature in the regenerate callback.
Now I am trying to track that output body outside the regenerate callback. Below the code snippet:-
//==========================================//
long trackingCookie;
CComBSTR name(L"TrackingIDOfOutputBody");
m_pSwApp->RegisterTrackingDefinition(name, &trackingCookie);
CComPtr
m_pSwApp->get_IActiveDoc2(&modelDoc);
CComPtr
modelDoc->get_Extension(&modelDocExt);
CComVariant objToSearch, filterTypes, trackedObjects;
modelDocExt->FindTrackedObjects(trackingCookie, nullptr, objToSearch, filterTypes, &trackedObjects);
//==========================================//
I have set the objToSearch, filtertypes to empty as per the information given in SolidWorks API help but didn't get the output body as trackedObjects for given trackingCookie.
Please let us know your views.
Thanks and Regards,
Mahadev
SolidworksApi/macros