Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Surface Text: "Text is expression" problem

klaus_krämerklaus_krämer Member Posts: 75 ✭✭✭
edited October 18 in Using Onshape

I am trying to create a set of radius gauges parametrically. Thus the radius should be engraved by a "Surface Text" feature, derived from the Radius, I define via a configuration variable.

How can I manipulate, that e.g. 20 mm isn't converted to "0.02 meter" (anyway: what a crap …), but is shown as "20 mm"? I tried string functions to no avail …

SurfaceText.png

Comments

  • GregBrownGregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 353 image
    edited October 18

    The text expression is being evaluated using the system units (meters) but it's easy to make this do what you want. Just use:
    #x/mm~" mm"
    as the input (where #x is the variable name you are using in your case). As you can imagine this allows you to convert to further units should you desire:
    #x/inch~" in"

  • klaus_krämerklaus_krämer Member Posts: 75 ✭✭✭

    Thank you @GregBrown !

    I assume, we can get even dimensionless values with the same technique? (e.g. Leaving the trailing " mm") away?

  • klaus_krämerklaus_krämer Member Posts: 75 ✭✭✭
    edited October 18

    Weird: All integers between 10 and 20 mm work, except 13 and 18:probably due to rounding issues?

    SurfaceText02.png SurfaceText03.png

    Also not working: 9, 26, 36, 51, … (Using

    SurfaceText04.png

    I'd classify this as a bug.(Using "R"~#Radius/mm now)

Sign In or Register to comment.