Reset Feature name counting number

User avatar
Lucas
Posts: 227
Joined: Tue Jun 15, 2021 3:46 am
Answers: 2
Location: Osaka, JP
x 171
x 169

Reset Feature name counting number

Unread post by Lucas »

When I cancel the creation of a sketch/feature/whatever and restart it the naming system keeps increasing automatically (which makes sense), but I want it to overwrite the non-existing features.

Is it possible to do?
image.png
Manually renaming it fix the counting, but still is a boring practice.
User avatar
Rob
Posts: 128
Joined: Mon Mar 08, 2021 3:46 pm
Answers: 2
Location: Mighty Glossop, UK
x 787
x 208
Contact:

Re: Reset Feature name counting number

Unread post by Rob »

I agree it can be tiresome, there's a couple of habits you can foster to help but I think you are best not worrying about it too much and/or renaming to meaningful names.

Instead of cancelling, try undo.

If it's a small part you can reload the document quickly.

A macro is probably best solution
artem
Posts: 26
Joined: Thu Mar 18, 2021 1:31 pm
Answers: 3
x 9
x 74

Re: Reset Feature name counting number

Unread post by artem »

You can tidy up your tree with this macro: https://www.codestack.net/solidworks-ap ... uentially/ and after it should continue with the next available number as the index for new feature
Thanks,
Artem
xarial.com - making your CAD better
codestack.net - SOLIDWORKS API macros and tutorials
User avatar
Lucas
Posts: 227
Joined: Tue Jun 15, 2021 3:46 am
Answers: 2
Location: Osaka, JP
x 171
x 169

Re: Reset Feature name counting number

Unread post by Lucas »

Rob wrote: Fri Aug 06, 2021 1:57 am Instead of cancelling, try undo.
Unfortunately Undo also increases the counting number hhhh

Usually I ignore it or start renaming from the beginning when I know it will be a complex part; but most of times it is a little complex and just bothers me to stop to fix it. lol
artem wrote: Fri Aug 06, 2021 2:31 am You can tidy up your tree with this macro: https://www.codestack.net/solidworks-ap ... uentially/ and after it should continue with the next available number as the index for new feature
Thank you, worked fine here. UU



May I ask any suggestion of site/reading to start learning Solidworks Macros? I just know basic programming and am postponing this. =)
User avatar
Glenn Schroeder
Posts: 1522
Joined: Mon Mar 08, 2021 11:43 am
Answers: 23
Location: southeast Texas
x 1759
x 2132

Re: Reset Feature name counting number

Unread post by Glenn Schroeder »

My best suggestion is to ignore those numbers. I do it just fine. If you can't or don't want to do that, re-name the features, sketches, etc to something that actually describes their function or purpose instead of just using numbers.
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."

Ray Wylie Hubbard in his song "Mother Blues"
User avatar
DanPihlaja
Posts: 849
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 812
x 980

Re: Reset Feature name counting number

Unread post by DanPihlaja »

Lucas wrote: Thu Aug 05, 2021 9:27 pm When I cancel the creation of a sketch/feature/whatever and restart it the naming system keeps increasing automatically (which makes sense), but I want it to overwrite the non-existing features.

Is it possible to do?
image.png

Manually renaming it fix the counting, but still is a boring practice.
Just rename Sketch4 to Sketch3. From then on, then next sketch will be Sketch4.

Try it out.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
Lucas
Posts: 227
Joined: Tue Jun 15, 2021 3:46 am
Answers: 2
Location: Osaka, JP
x 171
x 169

Re: Reset Feature name counting number

Unread post by Lucas »

Glenn Schroeder wrote: Fri Aug 06, 2021 8:15 am My best suggestion is to ignore those numbers. I do it just fine. If you can't or don't want to do that, re-name the features, sketches, etc to something that actually describes their function or purpose instead of just using numbers.
Usually I name it, but lots of parts is pretty useless to name everything and would be nice to have the names just in order .-.
dpihlaja wrote: Fri Aug 06, 2021 11:02 am Just rename Sketch4 to Sketch3. From then on, then next sketch will be Sketch4.
Try it out.
That's how I have been dealing with it. lol
thanks UU
Post Reply