Hello Dear Community,
Is there any way to automatically assign the Feature Name (KE-Name in German) to every pattern element?
In the model tree it looks like the instance gets the parent's name with a [x] extension, but the real Feature Name is empty for these objects. (Of course, when I modify the instance's name by hand, it will be transferred to the Feature Name as well.)
I've found no configuration option or anything for this.
Thank you in advance!
I do not believe that the UI has any function to automate this. One of the API customization tools may do it if you generate the code, I am nto sure if that function call exists in the API. You could certainly semi automate this but there is no looping or indexing function available for macros in Creo.
Are you attempting to create a unique name for each pattern instance automatically? If you explain why you need this then perhaps an alternative may be proposed.
I need to assign different layers to different features (mostly for sketches). And since I always name the sketches consistently (and there is no other distinction between these sketches), I thought a rule-based layer assignment based on the feature's name is the easiest way to spare the layer-assignment time. It would be a kind of "automation", and it works just as I expected for the single sketches but not within the patterns.
There is a bit of a challenge with your stated goal.
Pattern Members are System references (and not Feature references) of the Pattern feature
This makes building a search query to collect pattern members a bit convoluted.
See this article:
https://www.ptc.com/en/support/article/CS327028
There may still be a away to collect all pattern members within a pattern but it is not obvious using the search tool. I will need to consider this some more.
I think I found a way to do this by building a search query and saving it to a layer with rules. Here is an overview of the test part and layer rules. The strategy is to select all direct children of the pattern leader. I have not done testing for outliers within the pattern members so take this as a starting point.
This is the query built and saved as a layer with rules such that all pattern members would be added to the layer upon creation.
@TB_9857665 , I don't know of any option in Creo that "auto-assigns" real names to the real-named feature that you pattern. I suppose this should be a product-enhancement request.
As an aside, look at what happens when you pattern points - the software assigns real names to the pattern instances (though you have no control as to what those names will be ... )
Anyway, I am still not clear how you were planning to automate the layer assignment.
I assume that it would be with a layer rule that collects features that have a real name that starts with a specific string.
In that case, won't simply naming the pattern accordingly work for your needs?
For instance, if you you have a layer that collects features that start with "SKETCH1_":
renaming the pattern leader:
Renaming the pattern: