Page 1 of 1

Reset Feature name counting number

Posted: Thu Aug 05, 2021 9:27 pm
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.

Re: Reset Feature name counting number

Posted: Fri Aug 06, 2021 1:57 am
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

Re: Reset Feature name counting number

Posted: Fri Aug 06, 2021 2:31 am
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

Re: Reset Feature name counting number

Posted: Fri Aug 06, 2021 3:32 am
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. =)

Re: Reset Feature name counting number

Posted: Fri Aug 06, 2021 8:15 am
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.

Re: Reset Feature name counting number

Posted: Fri Aug 06, 2021 11:02 am
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.

Re: Reset Feature name counting number

Posted: Fri Aug 06, 2021 7:20 pm
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