Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Good morning,
Iam trying to get the features (members) of a pattern - but this pattern is a member of a group pattern itself.
Please see attached jpg - I want toget the pattern members with ids 309, 314, 315, 316, 317, 318. My use case is the following: "CHECK IF ID 309ISMEMBER OF A PATTERN AND GET THE OTHER PATTERN MEMBERS".
To find out if id 309 is a pattern member is easy - ProFeaturePatternGet() gives the answer and also ProPatternHeaderGet() and ProPatternLeaderGet() work as expected. But when I use ProPatternMembersGet() the content of the returned feature array contains id 309 (that's correct), BUT THEN ids 326, 339 and 352. But the last 3 are members of the top level group pattern. I know that there are functions for checking if there is a group pattern, but as a first step I want to have the members of the simple feature pattern.
My solution would be now (as a workaround) to check all other features in the model and collect all with same id for pattern leader or header.
Do I miss anything or do I have a wrong understanding of the Toolkit functions. Perhaps somebody has an answer for me before I file this as a new case at PTC customer support...
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Am Wartfeld 7
D-61169 Friedberg
phone: +49 151 21259910
Andreas,
You should check SPR's.There was a bugapearingin latemaintenancereleases of WF3, continued throughWF4 and WF5. To my recollection it was fixed in WF5 M110 or 140.
Feliks.
All,
thanks for alle the replies. I opened a case with PTC Customer Support.
It turned out that there are already SPRs in the databasediscribingsimiliar problemswith reference patterns and VB API....
The SPR numbers are:
These cases are also related to VB and Weblink methods Pattern.ListMembers(). This one causes Creo 2.0 to crash.
My estimate is that PTC R&D missed to update the Toolkit functions for nested patterns when these were introduced in interactive Pro/E core functionality - as far as I remember WF2 or WF3.
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Am Wartfeld 7
D-61169 Friedberg
phone: +49 151 21259910