Is there an easy way to auto rename a feature based on the sketch name, or vice versa, the sketch name based on the feature ?
(Appending an "S" on the sketch to discriminate)
Also, and more important, is there a way to make the feature name itself based, for example, on the most prominent characteristics of the sketch ?
Let me give examples:
A cylinder of 10 Diameter and 50 length would be auto named like D10L50Cyl
A rectangle of 10x20x50 would be auto named like A10B20H50Rect
And more:
A 10mm offset of the front datum plane could be named F10
And so on...
SolidworksParts And Features
I dare say you would be looking at a macro or something to do this Lucas.
Have you tried using the magnifying glass (top right corner) and searching the forum to see if there is already one created because somebody has posed the same question before?
Dave.
Yes. Macro serves
Where do I begin ?
Is it macro buggy or consistent ?
Can you sketch an approach or backbone that I could use to develop the macro ? I'll learn the rest
And no, there's no similar question on the whole forum or google.
Surprising that no one else had this issue before
As I type the title of the question, suggestions are shown. Neither even tangentiate the question
For future searches take a look here https://forum.solidworks.com/thread/208328#760492 first and download the excel file to match (which in your case is Macros) and using excel find you should be able to find a similar post in a few minutes..
Take a look here
https://forum.solidworks.com/message/196380#comment-196380
Two helpful tips
I've followed the comments in there and absorbed what I could, but I wonder if maybe someone has a closer to this case answer
Cause non object oriented C is a walk in the park close to these macros
Thank you so far
Some people really like coding. I'm on the opposite side, with the job not leaving me with time and brain to learn new stuff, like macros
If someone could make this favor, or even half of it, I'll buy a beer
(In heaven, of course. Very likely the helpful person will live on the other side of the world)
Don't look at me, wouldn't know where to start!...........
Dave.
Forgiven. I know the feeling...
I'd avoid using auto-rename feature because you'll end up spend more time to fix it
what happens if a sketch is shared with more than one feature? the program will crash or you can alternatively add prefix/suffix to the features which will be confused since a boss and a hole will be the same name with a prefix or suffix
There are few ways to model a cylinder, it can be a circle with an extrude, or a rectangle with revolve or two circle with sweep. which one you pick for your cylinder? For consistency, you're tied up with one way to model a cylinder
Who would want to sit down, write a program and provide many options then the users have to do all kind of setup to auto-rename features right?
More time than just manually rename the features