Variable in text does not change in pattern
Hi, I have a variable in a sketch text, when I apply a linear pattern which changes the variable, the text does not change.
Following example:
I would expect the blocks to have the size written on them, but the text is still the initial value of the variable
Answers
-
Hi, unfortunately it is not yet possible to use the text tool inside the sketch with expressions and reaplied patterns. But it is possible if you use the Surface Text FS.
an example:
0 -
You did everything right; we have a bug that affects patterns of sketches with expression-controlled text. Sorry for the inconvenience.
For now, I'd recommend @jnewth_onshape's Text custom feature: https://cad.onshape.com/documents/4e187c2b2f7f4974f4e2b612
0 -
So it's 15 months later. Why is this still a bug?
0 -
How does this text custom feature satisfy expressions? I can't find any example or get it to work with an expression.
The Surface Text feature worked for this, at least.
0 -
Hi @AsherAtSignalDesign I can try to answer both questions:
- It is a pretty rare use case and there is a workaround so I suspect it's not high on anyone's TODO list. Still, I would agree, it is an irritating bug. Specialized use cases like this are what custom features are for!
- The Text custom feature has a fix for this bug and it should be in my next release. I showed the fix to @_anton but hadn't published it yet. Apologies for the confusion.
0 -
FTR, I found a workaround for getting text expressions re-evaluated in feature-patterns that doesn't require featurescript by instantiating derived instances of the sketch. See here;
https://forum.onshape.com/discussion/24620/using-variables-in-text#latest0



