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.

Using Variables and Variable Expressions

brian_norrisbrian_norris Member Posts: 5
I'm trying to use variables (for almost the first time) and run into problems when I try using them in a formula. 



The variable #LEDDIA is entered right at the top of the tree and I am trying to dimension the hole as #LEDDIA + 0.2. Why does it keep coming up saying Enter a vailid expression? I've tried upper case/lower case, numeric /alphanumeric keypads, with and without brackets (parentheses) but nothing seems to work. Just entering #LEDDIA on its own works fine, so I'm at a loss as to what's going on. Can anyone help please?

Comments

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    edited November 2018
    it is a unit mismatch, the variable is of length type, and you try to add unitless number. #LEDDIA+0.2*mm should work
  • brian_norrisbrian_norris Member Posts: 5
    Whoops! I have finally worked out where I was going wrong. I assumed that as my drawing was in mm, all measurements would be as well, without my having to say so. Changing the formula to #LEDDIA + 0.2mm worked a treat! A more helpful error message would have been appreciated!
Sign In or Register to comment.