This topic explains the functionality and mechanics of using Variable Studios to create variables that can be used in the document in which they are created as well in other documents. You can create Variable Studios only through Onshape's browser platform, however, you can view and use the variables on all mobile platforms.
A Variable Studio is created in a document and the variables therein are immediately available for use in all Part Studios and Assemblies in that document workspace.
In a document, use the menu to create a Variable Studio:
The Variable Studio opens with a table for variables ready for input:
Type the name of the first variable in the Name column, first empty cell. (Only alphanumeric characters are allowed.)
Press Tab to move to the next row. A default type of Length is entered for the variable; to change it use the drop down arrow and select a new type.
Enter a default value for the variable and an optional description.
You can use variables defined earlier in the table to define the value of another variable later in the table. For example:
The L1 variable (length of the table top) is used to calculate the W1 variable (width of the table top).
To make the variables available for all Part Studios and Assemblies in the workspace, check the box at the bottom edge of the Variable Studio tab:
Unchecking this box removes the ability to use the variables in Part Studios and Assemblies in this document's workspace. (Keep the box unchecked if the variables are in a draft state and check the box when the variables are ready for use.)
To use a Variable table (and variables defined within it) in a document other than that in which it was defined:
Open the document in which you wish to use variables defined in a Variable Studio in another document.
Use the button to create a Variable Studio.
In the new Variable Studio, click the button at the top: Insert Variable Studio. The Insert Variable Studio dialog opens:
Select one of the two tabs at the top of the dialog in which to look for the Variable table: Current document or Other documents.
If there are any Variable Studios in the current document, they are listed under Current document. To locate Variable Studios in another document, select the Other document tab:
You can select either an entire Variable Studio table (shown above as Variable Studio 1), or select one or more distinct variables from the list. Your selection is made available immediately in the current document. In the case of inserting a Variable table or variable from another document, the document must have a version that contains the variables. If no version exists, you are prompted to create one before proceeding.
Upon successful selection of a variable and/or Variable table, you see the selected entities in the current document's Variable Studio:
The name and version of the Variable Studio from which the table was inserted is displayed at the top of the table, shown above as Variable Studio 1 V1.
Right-click on the Variable Studio tab and select Release:
For an additional Learning center resource, register for the following course: Variables and Expressions (Onshape account required).