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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Number of Holes as a Parameter in Part

NiruSatya
5-Regular Member

Number of Holes as a Parameter in Part

Can someone tell me what Relation should i use to create a Parameter that captures number of Holes in a Part.

 

If I use Hole command in a Part to make Holes [Not Extruded Cuts] and did patterns for few of them, I want Creo to capture Number of Holes including pattern members into a Parameter called NUMBER_OF_HOLES

 

@MartinHanak @tbraxton @KenFarley @TomU 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:NiruSatya)

No parameter currently exists with this value.  You would need to either count them using the Find tool or build some automation to count them for you.  (J-Link, VB, Toolkit, SmartAssembly, etc.)

View solution in original post

5 REPLIES 5
TomU
23-Emerald IV
(To:NiruSatya)

No parameter currently exists with this value.  You would need to either count them using the Find tool or build some automation to count them for you.  (J-Link, VB, Toolkit, SmartAssembly, etc.)

Hi,

every pattern contains "dimension" representing number of instances.

MartinHanak_0-1674290739733.png

Therefore you can create relation which counts hole quantity,

MartinHanak_1-1674290904876.png

 

 


Martin Hanák
NiruSatya
5-Regular Member
(To:MartinHanak)

For this I'll have to Manually feed this info into Relations and that's the current practice I'm following.

But I'm looking for a way of Automatic Hole Feature Recognition into Parameters / Relations.

tbraxton
21-Topaz II
(To:NiruSatya)

Without using one of the Toolkit APIs. The best option I can come up with to semi automate this would be to build a search query that will find all of the hole features and select them all with the search tool. There may be a way to extract the total number from that selection set for use in a relation using a mapkey. I have not done this specific task but have been able to use the query tool to create lists in selection that have been useful with mapkeys.

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Well, you can save the query result list to a layer, which can then be examined for information - which then does display the number of items.  One can hack away and create a mapkey where the contents of the info window are written to an external file, then parsed using another program, then paste the summary result into a note.  But all that is moot as it still requires the user to launch such a monstrous mapkey.

 

I think it would perhaps be interesting and cool if the search results could be stored as a feature, similar to how the analysis feature can be created and thus the user would have parameters such as "count" or "unique count", etc... that they could put into automatically updating parametric notes.

 

Top Tags