cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Creo C++ Toolkit ListItems/ListFeaturesByType does not work for family table instance.

jack15
12-Amethyst

Creo C++ Toolkit ListItems/ListFeaturesByType does not work for family table instance.

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.

ACCEPTED SOLUTION

Accepted Solutions
jack15
12-Amethyst
(To:jack15)

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.

View solution in original post

3 REPLIES 3
KenFarley
21-Topaz I
(To:jack15)

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.

jack15
12-Amethyst
(To:KenFarley)

Thanks for the suggestion I tried playing around with regenerating the family table instance before attempting to find components but that made no difference

jack15
12-Amethyst
(To:jack15)

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.

Announcements


Top Tags