Hello, I am trying to find a way to reference the number of instances in a sketched pattern on the drawing parametrically, however I can't locate how to do it. Creo clearly stores the number, as when I look at the feature information, it says that the sketch is the leader of a (X x X) general pattern, as shown in my attachment, but I can't figure out how to reference this number.
Any assistance would be greatly appreciated, as I would like this to update the drawing automatically if any changes are made.
EDIT: I have attached a reference file as well.
There is a pattern dim within the pattern feature with the # of instances. You can reference this on the drawing by inserting the parameter name.
Note that this is for a sketched pattern, meaning that the pattern is driven off of points in a sketch. As such, when I look at the dimensions of the feature, there is no "pattern" dim.
Use the edit dimension tool to display your model pattern dimensions, the Tools and Switch parameters to show the parameter names instead of the values. Use these for your references.
You will get better suggestions if you can more completely specify what you are working with. Post the model(s) for best results.
I am not aware of a "sketch pattern" feature in Creo parametric 4 or earlier. Pattern is not available within sketcher. Terminology is important. If you can fully explain the features involved or post an example model that would be optimal.
It's a point pattern using a sketch.
I've attached a part with what I'm talking about, as well as an image of how it looks when I show dimensions.
When I look at the pattern info, it shows the number of instances driven by the points in the sketch, so Creo clearly knows how many instances of the holes there are, but there's no clear parameter for when a point pattern is used.
One method to solve this is to not use your sketched points to drive the pattern.
1) Create a single point on the top surface of your part that is dimensioned wrt to edges, or datums.
2) Create a pattern of the point using "table" option and enter the coordinates for each point
3) Create the hole using the top part surface and the lead dtm point (from step 1)
4) Pattern the hole using "reference" option
You can then access the # of instances from step 2 using relations
I have enclosed an example for reference.
Unfortunately since this model is using external references to keep the holes aligned, a table pattern doesn't fulfill the requirements, and a sketched pattern is all but necessitated.
Is there no way to access the internal count of the pattern that Creo has in the background as shown below? Seems like a massive oversight on PTC's part if that's the case.
I have some other options in mind to use the table pattern. If can describe the nature of the external reference for the point pattern locations I might come up with something.
The issue is the "sketch pattern" is not a pattern it is a sketch with multiple geometry points. The actual pattern feature in your model does not control the number of instances hence the issue.
You could definitely drive the table on two or more parts from a common file and do what you are asking with a layout.
The external references are so that if the hole locations change in one part, the mating part updates automatically.
I have the holes defined off of the edges of the part so that if the part lengthens, the holes maintain equal spacing. Having an external program define the hole locations would not be ideal because if the parts grow, the hole spacing will not update with the part.
We also use Windchill to organize our data, so having a third external file drive the hole locations would not be ideal for that reason as well.
At this point, even a relation to count the number of sketch points would work, but it's frustrating that the program clearly knows how many holes there are on the back end when I look at the pattern feature information, but it won't allow me to access that number and reference it on the drawing.
From your description I am pretty confident it could be managed with a layout. A layout should not be any issue with Windchill. I have used layouts to manage much more complex designs than what you are describing. You have to determine if the extra work to implement this is worth it. It seems that it is not unless you anticipate making revisions to the design and would benefit from the automation using the layout.
There is more than one way to deal with this as you have described it but all are going to require that you have a pattern feature available to access what you want.
You can maintain your hole spacing based on the part dimensions so that length changes update the holes in an automated fashion and still use a table pattern driven from the layout which controls the hole spacing on two or more parts and will keep them lined up.
I've seen questions on this forum before same as OP - how to get the # of pattern instances - for example, because you want to report this number in a drawing note?
In my opinion, the answer to OP is that it's not really possible - because this parametric software does not let its user have a parameter that lists the number of actual instances in a pattern feature.
So what I thought was that this is not a limitation of the sketched-point-driven pattern variety. But you claim you can use relations to somehow find it? I'm curious as to how you would get the # of instances in your table pattern? - could you explain step #2? (I've downloaded your example but I don't see any relations)
Also note that the number of actual instances can differ from the # of rows in the pattern table - because individual instances in the pattern can be "turned off" (turn the black dots white during the pattern definition)
I've seen people offering work-arounds that compute the # of instances by multiplying the x-count by the y-count of a regular grid - but this will not work in the case of skipped instances. I've seen suggestions to measure the mass of the plate before and after the hole pattern feature and then use relations involving density to figure out how many holes were drilled. It's just funny what one has to do to make things work with Creo.
To the OP - since you seem to be dealing with holes, keep in mind that standard hole somehow comes with the PATTERN_NO parameter that can be used to display the actual count in a hole note.
Yes, the hole note can be used to display the number of holes in the pattern, even with a point pattern. I don't think it can be used outside of the hole note, however.
EDIT: It can! I just played around a bit, and here's how you can access the pattern number: You need to make the note in the model, not in the drawing, I think. Make any note, and write whatever you want. Where you want the pattern number to appear, just write "&Pattern_No". You then need to edit the properties of the note and set the hole as the parent. See image below. This will allow you to access this number.
Note that this only works with standard holes, though, not simple holes. But you can make clearance holes as standard holes, too. Just remove the thread.
Oh man, sounds like a good start for a classic Pro/WorkAround 😋 for the general case of trying to show the count of pattern instances: just make reference patterns with phantom holes that have 0.00001 micron diameters and depths (so they won't ever show up on your drawings - reminds me of the solution to making tables on drawings without outer borders). Or make this hole point "away" from the material (drill into space) and ignore the "feature does not intersect model" messages and then show the phantom hole callout note in the drawing - positioning it in the middle of the proper note.
Anyway, thanks for the tip about attaching note to the parent feature. Funny thing is, the parameter "PATTERN_NO" does not show up in the hole features parameters table.