Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I am working with a C++ Toolkit program on Creo 10.0.5.0 that recursively searches through an assembly's parameters. The problem I am facing is when it runs into family table parts. When I attempt to retrieve the component features from a family table instance it only ever returns the components from the generic.
So then when the code attempts to recurse on certain parts in the family table generic it fails because those aren't in the instance and therefor not in session. I have confirmed that the assembly I am reading parts from is the instance as GetFullName() returns filename<filename> corresponding with the instance.
Solved! Go to Solution.
Although it doesn't directly fix the issue described here I have began using the method `wfcWComponentFeat->GetStatusFlag()->GetIsFamtabSuppressed()` in order to filter out those parts that are coming from the generic - it is working well for my purposes.
I'm not conversant with C++ or any toolkits for Creo, but have done quite a bit with family table parts and the like. I'm wondering if your difficulties are being caused because the instance(s) are not regenerated. I've seen a similar thing when I'm using family table parts in an assembly and relying on their parameters to fill out a table of geometric results. If I haven't regenerated all the components, they all display in the table with the generic model's data.
Perhaps you could try regenerating the instance prior to obtaining data from it?
Again, just a guess, but worth asking.
Thanks for the suggestion I tried playing around with regenerating the family table instance before attempting to find components but that made no difference
Although it doesn't directly fix the issue described here I have began using the method `wfcWComponentFeat->GetStatusFlag()->GetIsFamtabSuppressed()` in order to filter out those parts that are coming from the generic - it is working well for my purposes.