Increment Text in a Sketch

Hello;

Rather than digging up old topics on the question of " is it possible to increment text in sketches "... (yes, yes, he does).

The goengineer.com site offers an interesting solution:

https://www.goengineer.com/blog/creating-incremental-numbers-in-solidworks-using-instances-to-vary

Article by Chris Villeneuve on February 19, 2025

Adding numbers to a template can be a repetitive and time-consuming process. In some cases, this process can be facilitated by using SOLIDWORKS pattern tools and their Vary functions. Let's take a look at the configuration and applications of this feature.

Linear pattern

In this example, I have a 6-inch ruler that needs numbers to designate the appropriate length markings.

Ajouter des numéros au modèle de règle SOLIDWORKS

I need to establish, numerically and spatially, where the series of numbers should begin. In this case, I'm going to start increasing from the 0.5-inch bar and continue in half-inch increments all the way up to 5.5 inches."

To do this, I need to bind a seed dimension value that will be incremented, to a custom property (in this case called "Start"). I'll then need to bind this custom property to sketch out text used to emboss or scratch the resulting value on the part.

Steps

  1. Create a sketch and add a dimension that will serve as the starting number in your design. In this case, " 0.5 ".

Ajouter des dimensions à une croquis SOLIDWORKS

  1. Bind this dimension to a custom property.

SOLIDWORKS Propriété douanière

  1. Then, bind this custom property to sketch text at the location of your first bar mark.

SOLIDWORKS Lien vers le plasma de croquis

  1. Use the sketch to create either a cutout or an extrude feature.

Comment ajouter des nombres incrémentaux dans SOLIDWORKS

  1. Next, create a linear pattern that references the extrude or cut-out feature. In this example, I'll use the top edge of the part for pattern direction, 0.5" for spacing, and 11 for instance counting. Select the " Instances to Vary " checkbox and select the dimension you linked to the custom property. Then set the increment value to 0.5".

Création de nombres incrémentaux dans SOLIDWORKS en utilisant des instances pour varier

The resulting model will automatically increase by 0.5" units per instance generating the measurement marks.

.5 Nombres incrémentaux de pouces dans les SOLIDWORKS

The instament can vary in several directions and at different increment values. Here, the ax axis is incremented by 1, while the y-axis is incremented by 10.

Valeurs d'accumulation pour SOLIDWORKS

Change the starting value and increment to "2" for even numbers.

Même les valeurs incrémentales dans les SOLIDWORKS

Use a circular pattern to generate the hours on a clock.

SOLIDWORKS Motif circulaire avec des nombres incrémentaux

You can also model through multi-body parts for part numbering.

Motif entre les pièces multicorps pour les numérotations de pièces dans SOLIDWORKS

There are several ways to use structured tools to increase productivity and reduce repetitive tasks. I hope this article gives you some insight into how to better harness the power of SOLIDWORKS pattern features and their instances to the Vary function.

9 Likes

There is surely a step that I don't understand. (or a bug?)
it works paaaaaaaaaaas!! :rofl:
image
image
Otherwise it looks great. Thank you @maclane for the tip. Too bad I can't get it to work. :rofl: :rofl: :rofl:
Item3.SLDPRT (478.0 KB)

1 Like

Hello
@sbadenis , runs on SW2024. I just re-edited the text function and reapplied the property link.

Thank you @Cyril_f definitely Sw2023 is a real...
Between the dxf sym that doesn't export well, the families of parts that don't change anymore (pb memory on large family of parts), and now the repetitions with variable that doesn't work.
That's a lot of bugs for an SP05 version... (not counting the ones I couldn't find...)
Thank you @Maclane for making my mouth water for nothing! :laughing:

Sorry @sbadenis ... it works not too badly under Solidworks 2022 (without wanting to rub salt in the wound).
Look, if ever, you can modify the attachment.
Pièce1_2002.SLDPRT (2.0 MB)
Maclane (seller of REVE for @sbadenis ... :sweat_smile:)

1 Like

Barely opened:
image
It's with this kind of improvement (2022->2023) that SW devs generate a job for life!

No doubt :cold_face: :cold_face: :cold_face:
The worst part is that if it's in 2023 SP04 it works too! :rofl: :rofl: :rofl:

Funny (well, if you want...)
On opening: (No increment)
image

After rebuilding:(CTRL+Q)
image

2 Likes

@Maclane can you send me your Q key?
I have the 0s that disappear!!
image

On the 2020 it's even better, I can't even select the text to extrude it...

Surprising @Sylk I had the 2020 before and I extracted text from time to time, on the other hand for the following steps I have a doubt!

[Mode: I shouldn't make this joke but...-ON-]
Sorry, I don't really like the idea of sharing my " Q " (yes, it's borderline...)
[Mode: I shouldn't make this joke but ...-OFF-]

Note: The zeros that disappear are probably due to the setting of the different rating options between our stations...

3 Likes

Me too, but since then I've switched to sp5...

We had installed the Sp5 directly (no other SP) and it worked, try by changing the text font maybe. (sometimes the lines intersect with certain fonts, so extrusion impossible)

2 Likes

That's why I put " key " before with no innuendo (it's not my type...) :grin:
For the 0s, yes that's the settings I understood and it didn't worry me, it's the rest for which I complain!

1 Like

No, even with the original Century font.
Too bad. One day when I want to play with text it will drive me crazy, but now I'm not going to worry about it, he doesn't want to, he doesn't want to, I don't insist.

1 Like

Don't be sad :sneezing_face: It's just that at DS they thought it was too good, so they removed it from the 23. See the help text below, finally help!!
image
Gone is the value increment

2 Likes

Hello

At first glance bug of the 2023 fixed in 2024 SP1.
image

1 Like

Thank you @Cyril_f , that's what I feared!
There was a long time ago when the Sp5 were the least buggy, but now they are just as much, it's already the 3rd proven bug that is not fixed under SW2023 but only in 2024...

1 Like

We will be able to develop a theory opposite to that of Windows:

Windows: Avoid even years (Windows millennium, Windows 8 are good examples, with an exception for Windows 10...)
Solidworks: Avoiding Odd Years (Solidworks 2017,2019 (a disaster)... and Solidworks 2023 doesn't look any better)...
The trend would also have it that this applies to SPs? "Not glop" the odd numbers?
Since zero is not really a number, but rather a representation of nothingness, the latter is automatically excluded... and Since we are talking about Office...

3 Likes

@Maclane, this is a bit the problem of any development at the moment (we see it a little in all areas). We release something unfinished with " regular " updates.
For the case of this function, according to the attached SPR, it was functional in 2022, non-functional in 2023, corrected in SP1 2024 (when I think that SW communicates on a quick fix on its cloud version I ask to see).
I also don't know which version had an SP5.1 released in an emergency because the SP5 was so full of bugs.

3 Likes