Pattern of sketches containing text with increasing values

I am trying to create a circular pattern of (embossed) text on a surface, with each instance displaying a different value in increasing order. A simple example would be a clock with hours values increasing around the dial. My final project will have much more than 12 values but the dial will serve here as an illustration for my problem.

So I did the folowing steps :

  • create a unitless variable "#num" initialized at 0,
  • create a second variable with same name defined as "#num+1",
  • create a sketch text with value "toString(#num)" with "convert to expression" enabled, it correctly displays "1" on sketch,
  • create the circular feature pattern including the second variable feature and the sketch displaying the "1", with "Apply per instance" enabled.

Unfortunately the circular pattern repeats the "1" value around the dial. So I started to search for public projects with a similar aim and found this project which creates a circular pattern of roman numbers. At first I thought that the custom feature used in the project was responsible for this correct behavior, but after copying the project and gradually removing the unwanted features (including the custom feature converting to roman numbers) I easily obtained what I wanted (see my version of the project here).

So I turned back to my project and tried to find what was wrong, but I am right now confused because I don't see what goes wrong in my version. Even when I repeat the same steps in the same order I am completely unable to obtain something different from a circular pattern of "1". However, when I add a sketch to display the value after the circular pattern, Onshape displays "12", indicating that the "#num" value was correctly updated per instance.

Do you have suggestions to obtain the correct result ?

Best Answer

Answers