Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
"Feature Name Template": "Name " + Correlative number
emagdalenaC2i
Member, Developers, Channel partner Posts: 863 ✭✭✭✭✭
FeatureScript features name is by default "FeatureName " + Correlative number. But can we set the "Feature Name Template" to something like "otherName + Correlative number?
Un saludo,
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
0
Comments
I think you're looking for the "annotation" above the call to "defineFeature()". This feature will show up on the feature list as "Some Other Feature Name 1", "Some Other Feature Name 2", etc.
I think this Featurecript will show up on the Feature list as "Some Other Feature Name", "Some Other Feature Name", etc. without any number
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
------------
------------
Just tested it out and it shows up as expected (With the correct ascending numbers) on my end. Is it not working for you?
But what I want is to keep that name and use another name for the features created. Like in this example
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común
If you want the behavior you describe, you could have each of your features increment a "counter" context variable via setVariable and getVariable, then set the "index" feature computed parameter to equal your "counter" variable. Alternatively you might have more helpful distinguishing identifier to append to each feature. That's up to you.
Note that the above will behave slightly differently our normal feature counters. Names like "Extrude 1" and "Extrude 2" are editable, but stay with the feature when you, say, reorder them. Your computed name is not editable, but will dynamically update to display its correct index within the feature list.
I will run some test
Eduardo Magdalena C2i Change 2 improve ☑ ¿Por qué no organizamos una reunión online?
Partner de PTC - Onshape Averigua a quién conocemos en común