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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Toolkit: How 2 get pattern member features

AndreasHellmann
3-Visitor

Toolkit: How 2 get pattern member features

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3


Andreas -

If I follow your example correctly, IDs 309 & 314-318 are members of
Pattern
ID 313. Have you tried using ProFeatureGroupGet() on Pattern ID 313 to get
the parent group? ProPattern is documented as a subobject of ProFeature.

|+| M a r k |+|

Mark Stallard
Business Application Services
Global Business Services Information Technology
Raytheon Company




(business)
978-436-8487
(cell)
617-331-5443



-



880 Technology Drive
Billerica, MA 01821
www.raytheon.com

This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this message
in error, please so advise the sender by reply e-mail and delete this
message. Thank you for your cooperation.









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:


2126119
2166184
2193933


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

Top Tags