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.
Issue with variables not being available in sketches
Hello,
I am happily progressing in using Onshape.
I want to use variables. From what I have seen, a variable I create can be used in the sketches that I will create AFTER creating the variable. But I cannot refer to it in a sketch that already existed at the moment when I created the variable. By the way, the variable disappears from the variable table as soon as I open an "old" sketch for editing.
In a previously existing sketch, I can create a variable with the same name as this particular variable I want to use, with whatever value. However, if I do that, the Part Studio related variable seems frozen : its value can no longer be modified.
Is this the normal behaviour ? Is there a way to define a Part Studio related variable that will be usable in any sketch, whatever the creation chronology ?
Comments
Move the variable up in the tree above the sketch you want to use it in
You can initiate a variable during the sketch/feature. When the value dialog opens during dimensioning enter # instead of a number and a list will show up. Select new variable and the variable dialog opens. When that is complete the variable will show up in feature tree ahead of sketch/feature. As Eric says, move up the tree to make available in previous features/sketches.
Thanks.
I do not yet understand the full power of the tree. But I am one step closer today.
@jean_marc_billaud - What I do is create a folder at the top of the feature tree, that I named "variables". This is where I keep all variables, and they will always be available in any sketch. I started doing this before OnShape introduced the variable studio, and it just became a habit - right or wrong, it works for me. Just thought I would share.
Also makes it very easy to show/hide the variable list.