Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Linear pattern number text with increasing value
giovanni_bernal
Member Posts: 9 ✭
If I have the following Part Studio with a #width variable:
Is it possible to have the text linear pattern, say, to the right, to create a total of n text instances whose text string is the value of #width with, say, 0.1 increments? e.g., in this case the resultant linear patter would be:
5, 5,1, 5.2, 5.3, 5.4, …
Tagged:
0

Comments
Yes. I suspect that @jnewth 's Text feature would be helpful.
https://cad.onshape.com/documents/4e187c2b2f7f4974f4e2b612/v/4446c75baffebee73f367acc/e/e8c85370413ae1136b63f9df
Simon Gatrall | Product Development Specialist | Open For Work
Unfortunately, it doesn't seem like it accepts fractional numbers, only whole ones
Also, I can't figure out how to change the distance between the text instances
The Text custom feature distributes values along a path. So if we want 5 numbers spaced at even intervals 5mm apart, we first draw a line segment (5-1)*5mm = 20mm long.Then, for your fractional increments we would just use a comma separated list "5, 5.1, 5.2, 5.3, 5.4". Obviously it gets very tedious but it does the job:
You are right, the Text feature doesn't support fractional spacing. I can change that for sure, but then I also have to introduce precision controls so you get the text "5.1" instead of "5.10000000000001" (as sometimes happens with floating point and double precision numbers).
Here's an example of how I set that up:
https://cad.onshape.com/documents/7e50219d014943e502feaddf/w/3df70b775e74fb839ffb208f/e/54958cc277214f7971d7b395