AnsweredAssumed Answered

IModelDocExtension::FindTrackedObjects() method fails to return the tracked objects

Question asked by Mahadev Dharme on Dec 9, 2019
Latest reply on Dec 9, 2019 by Prashant Baher


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<IModelDoc2> modelDoc;
CComPtr<IModelDocExtension> 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,