Is this method getFeaturesMethod(model) traverses the feature from IComponent2 interface or from IModelDoc2 interface? If this is IModelDoc2, are you using IComponent2::GetCorresponding? I think this is a possible issue.
Artem Taturevych, Application Engineer at Intercad (Australia)
translationXpert – add-in to translate SolidWorks models
myIntercad – an integrated tool for SolidWorks Professionals
For both methods, I am doing the following:
- IComponent2::GetChildren() (called recursively to get all the components)
So basically, I get all the child IModelDoc2 objects, and then call GetFeatures() on each one.
Yes, as I said you might need to have your pointers in the assembly context. Either traverse features on component level (IComponent2::FirstFeature) or convert the pointers using the IComponent2::GetCorresponding