Structure:
I am trying to traverse the feature tree to measure the X,Y,Z distance between each component reference geometry feature and that component's origin.
swFeature->Select2(false, 0, &result); // CComPtr
swDocExtension->SelectByID2(L"Point1@Origin@
Line 2 returns 0 every time and I am not sure why. If I manually launch the measure tool and select the origin I want it returns the path/name I specified above. If I run the macro recorder and select the origin it returns the same code as line 2 as well.
Also, I am calling swModel->ClearSelection2() after every 2 selections, but it isn't erasing the selections. This works in a different function of mine so I'm not sure why...
I am getting IModelDoc2 by calling swIComponent2->IGetModel2(&swModel) ... is this an issue?
SolidworksApi macros