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.

Improvement Request: Change a variable scope

When working on a part I often create variables that I later find would have been better defined in a variable studio or as a configuration variable. I think it would be nice if I could select a variable and change it to a configuration variable, a variable table, or a part studio — options would depend on where the variable is currently defined.

Comments

  • GregBrownGregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 250

    If you decide something that you've made a variable in a Part Studio should have actually been in a Variable Studio, just make the Variable Studio and create the a variable with the same name. Then back in the Part Studio delete the local one.

  • ross_pettingerross_pettinger Member Posts: 6

    @GregBrown Thank you for the feedback. I experimented with your suggestion and it does work.

    For anyone else that reads this, it seems a variable in a Part Studio feature tree has precedence over a Configuration Variable in the Part Studio and a Configuration Variable in a Part Studio has precedence over a variable in a Variable Studio. If you delete a variable and there is another variable with the same name "visible" the measurement(s) will use that variable. Adding a new variable can "hide" or be "hidden" by another variable. I don't know if this is all documented someplace else, but this is what I found.

    A right-click and select a new scope would still make things easier, but the suggestion by @GregBrown works and is easy enough.

Sign In or Register to comment.