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.

Options

What are Best Practices, regarding Variable Table vs Variable Studio ?

eldon_browneldon_brown Member Posts: 40 ✭✭
What are the advantages and best practices regarding use of "Variable Table vs Variable Studio"?
Are Configuration Variables different?
Does a variable with the same name in each override the other? 

I have search for this info, but still confused.

Thanks,
-Eldonb

Best Answer

  • Options
    _anton_anton Member, Onshape Employees Posts: 292
    Answer ✓
    For most purposes, you can just use the variable table panel in a Part Studio or Assembly. The only nuance here is that you may have imported only a subset of variables from a Variable Studio, in which case the table won't show you the rest.

    And yep, the override rules are as you describe (note the info icon next to the overridden variable name).

Answers

  • Options
    _anton_anton Member, Onshape Employees Posts: 292
    Variable Studios are meant to provide a robust mechanism to share variables between tabs and documents. Part Studios, Variable Studios, and Assemblies can import from Variable Studios. (Part Studios can also define their own variables: you can imagine that a variable may not be useful outside a Part Studio, so you keep it to the narrowest scope you can.)

    A variable table makes it easy to view and change variables. It's the tab you can see on the right edge of any Part Studio and Assembly, and the entirety of a Variable Studio; it's the typical way you'd want to interact with variables. In some less-common-than-average cases, you do need to know that Part Studio variables are actually created and changed in features.

    Configs are conceptually different - while normal variables can be viewed as an internal part of your design's definition, configs are normally viewed as external inputs. Imagine a part studio you're deriving into another document; you see its config variables then, and you need to specify their values in order to actually create the part. Of course, this definition can get blurry.

    Yes, there are some override rules. When you import a Variable Studio, the variables are essentially declared in the order shown in the variable table, so later definitions of a particular variable override the ones higher up.
  • Options
    eldon_browneldon_brown Member Posts: 40 ✭✭
    _anton said:

    A variable table makes it easy to view and change variables. It's the tab you can see on the right edge of any Part Studio and Assembly, and the entirety of a Variable Studio; it's the typical way you'd want to interact with variables. In some less-common-than-average cases, you do need to know that Part Studio variables are actually created and changed in features.

    It appears that the Variable Studio names and values shows up (at the top) as part of the Variable Table (tab on the right of Part Studio) so does that mean any variable with the same name below overrides the Variable Studio value?  Also, it appears that new variable can be created it the top section (Variable Studio section) but I do not know if there are limitation or reasons to not use that interface as opposed to opening the Variable Studio Tab? 



    Things are getting clearer, but I am not out of the woods, yet.

    Thanks,
    -Eldonb
  • Options
    _anton_anton Member, Onshape Employees Posts: 292
    Answer ✓
    For most purposes, you can just use the variable table panel in a Part Studio or Assembly. The only nuance here is that you may have imported only a subset of variables from a Variable Studio, in which case the table won't show you the rest.

    And yep, the override rules are as you describe (note the info icon next to the overridden variable name).
Sign In or Register to comment.