Variable Studio Configurations
In Onshape, you can configure Variable Studios similar to the way you can configure Part Studios and Assemblies.
You can configure any variable value or description. All values and descriptions you configure in one Variable Studio are referred to as a configuration. One configuration can include multiple configuration inputs.
The configuration inputs you define in a Variable Studio become options in the Insert dialog when you insert the Variable Studio into another tab or document.

- Click the
icon on the right side of the Variable Studio window to open the Configuration panel.
- The Variable Studio cannot be configured while being automatically referenced. Deselect the Insert into all Part Studios and Assemblies checkbox. (When you insert a configured variable table into a Part Studio or assembly, you must choose which configurations to insert.)
- Click Configure Variable Studio. A configuration input table appears in the Configuration panel.
- Click in the first row to activate it, and enter the input value names in the first column. Press Tab to move to the next row. The blue bar to the left of the row indicates the currently selected configuration in the Variable Studio.
- Right-click a variable value or description and click Configure on the context menu to add it to the configuration table.
- Continue right-clicking and selecting Configure to add additional values or descriptions to the table. The selections are added to the table with their default values, and are highlighted in orange in the Variable Studio.
- Double-click and edit the values in the configuration table as necessary.

- At the bottom of the Configuration panel, click the Add configuration input arrow and select the type of configuration to add. Clicking the button instead of the arrow automatically inserts a List configuration type.
- Select an option from the menu:
- List - Creates a list of selectable values to present at insertion.
Checkbox - Creates a checkbox to check/uncheck during insertion.
Configuration variable - Creates a variable that can be used in any feature or in FeatureScript.
-
Edit the values in the configuration input table as needed.

See Basic steps.

- Click the Add configuration input arrow and select Checkbox.
- Add a Name for the input in the dialog that appears.
- Use the Default option to specify if the configuration should be checked or unchecked by default. This can be changed later.
- Click the green check mark to add the input to the Configuration panel.
- Right-click the value or description to configure in the Variable Studio, and click Configure with to add the value to the input.
- Edit the values in the input as needed.

- Click the Add configuration input arrow and select Configuration variable.
- Add a Name for the variable in the dialog that appears.
- Select a type for the variable. Choose from Length, Angle, Integer, Real, or Text.
- Enter the values for the variable.
- Click the green check mark to add the input to the Configuration panel.
- Enter the values for the variable.
- Right-click a value or description in the Variable Studio and select Set to...
The value is added to the Configuration panel

Configured Variable Studios cannot be released.

-
In the Insert Variable Studio dialog, select the configured Variable Studio.
-
Make selections in the dialog to specify which configurations you want, then click Generate.
Click the Set to last viewed configuration dropdown (
) to select the last active configuration in the Variable Studio, or select Reset to default to set all inputs to their default values.
-
Click the Variable Studio to insert it into your Variable table, or select individual variables from the generated list.

- Insert the configured Variable Studio into the Variable table as described in the last section.
- In the Variable table, click the three-dot menu button and select Edit reference.
- In the Update Variable Studio dialog, right-click the configuration and select Configure (or Configure with if multiple configuration inputs exist in the Part Studio or assembly).
- A notification appears that the Variable Studio has been added to the Part Studio/Assembly configuration. Click the checkmark to close the dialog.
- Open the Configuration panel in the Part Studio or assembly. The Variable Studio configuration becomes a feature (column) in the Configuration panel.

The examples in this section show a configured Part Studio. Functionality is the same for configured Variable Studios.
組態顯示情形條件對話方塊可讓您在組態中加入邏輯,以控制何時可以使用某些輸入項與選項。

請考慮一個有高度 (Height) 與寬度 (Width) 這兩個輸入項的零件。
根據預設,任何高度可以有任何的寬度。但假設「Extra Wide」寬度僅能用於「Tall」的高度中。在這樣的情況下,我們可以設定「Width」輸入項會顯示的條件為何。
- 在組態面板中,按一下輸入項的三點按鈕,然後從功能表中選擇顯示情形條件。
組態顯示情形條件對話方塊開啟。右側的面板顯示目前所選組態的預覽。您可以直接在這個面板中變更所選的選項來預覽您的設定。 - 按一下加入條件。
- 按一下第一個下拉清單,然後選擇控制這個輸入項顯示情形的輸入項。在這個範例中將選擇「Height」輸入項。
- 在第二個下拉清單中,選擇是來選擇特定的選項,或選擇是介於來選擇選項的範圍:
- 是:按一下出現的第三個下拉清單,然後選擇對該輸入項允許的選項。
- 是介於: Click the third dropdown and select the first allowed option in the range. Click the fourth dropdown and select the final allowed option in the range.
在這個範例中,僅有「Tall」高度能使用「Width」輸入項。在右邊的預覽會更新以反映您的選擇。您可以在下方的圖片中看到「Default」高度無法再使用「Width」輸入項。
- 按一下儲存。現在僅能在選擇了「Tall」高度時,「Width」輸入項才會顯示,且「Width」輸入項表格會出現顯示情項條件圖示
。

您可以使用在組態顯示情形條件對話方塊中的選項規則設定來指定某些選項會出現的條件為何。
只能為清單輸入項設定選項規則邏輯。
- 在組態顯示情形條件對話方塊中展開一個輸入項,然後按一下加入選項規則。在對話方塊中會出現一個新的部分:
- 在顯示行中,選擇要控制的選項。
- 選項:按一下出現的下拉清單,然後選擇要為其設定條件的選項。
- 範圍:按一下第一個下拉清單並在範圍中選擇第一個選項。按一下第二個下拉清單並在範圍中選擇最後的選項。範圍包括特定選項,並且允許重疊範圍。
- 在當行中:
- 從第一個下拉清單中選擇輸入項。
- 選擇是來選擇特定的選項,或選擇是介於來選擇選項的範圍。
- 是:按一下出現的下拉清單,然後選擇選項允許的值。
- 是介於:按一下第一個下拉清單,然後選擇範圍中允許的第一個選項。按一下第二個下拉清單,然後選擇範圍中允許的最後一個選項。
-
按一下加入條件並重複這組步驟來繼續在組態中加入邏輯。
系統會以「和」(AND) 的陳述將選項規則中的條件合併在一起;必須滿足所有的條件控制的選項才會顯示。
- 再次點按加入選項規則來加入其他選項的條件。
- 按一下 [儲存]。
在下方的範例中,僅當「面積」是「Default」或更大時,才能使用 "Deep" 選項。僅當「面積」是「Large」、「Default」或「Small」時,才能使用 "Standard" 選項。僅當「面積」是「Small」或更小時才能使用 "Shallow" 選項:
下一個範例使用重疊的範圍來指定顯示情形條件:
下方的範例使用選項與範圍控制的組合來設定所需的邏輯。

輸入項條件是累加的;如果將第三個組態加入到上方的範例中並設定如下圖所示的條件,則只有同時有「Tall」高度與「Extra Wide」寬度輸入項的零件可使用「Large」圓角選項。
當為「Tall」高度將寬度設定為「預設」時,系統會隱藏「Fillet」組態。
組態輸入項僅能控制在「組態」面板中出現在其下方輸入項的顯示情形。在這個範例中,「Width」輸入項會受「Height」輸入項的控制,但不會受到「Fillet」輸入項的控制。

如果找不到所需的輸入項或選項,系統會自動修復顯示情形條件 (移除)。
例如,如果「Width」輸入項的顯示情形是取決於「Height」輸入項,然後刪除了「Height」輸入項,則會自動移除「Width」的顯示情形條件。這也適用於被刪除或移動的個別選項。在這個範例中,同時從「Fillet」選項中移除「Height」輸入項。
您會在工作區中看到警告訊息,同時會在對話方塊中移除條件:

-
會在所有插入對話方塊 (例如,在將經組態零件插入至組合件中時) 中提供您所設定的顯示情形條件與選項規則。對顯示情形條件的變更會自動反映在參考了組態元素的所有現存文件中。
-
隱藏的輸入項永遠有其預設值。在本頁的第一個範例中,「Short」與「Medium」高度的零件會有「預設」的寬度,即使沒有設定寬度選項。
-
如果組態輸入項沒有可見的選項,其是被隱藏且假定使用預設值。
-
-
當ˋ摺疊了輸入項或選項時,對話方塊中會出現顯示情形條件的摘要。
-
(僅適用於零件與 Part Studio):從屬性中被排除的組態輸入項僅能控制其下方也被從屬性中排除其他輸入項的顯示情形。在下方的範例中,如果將「Width」則屬性中排除 (以
圖示表示),則其僅能控制「Fillet」的顯示情形 (如果同時從屬性中排除了「Fillet」)。
-
(僅適用於零件與 Part Studio): 在發行套件與修訂版參考值中會將從屬性中被排除的組態輸入項視為有其預設值。如果顯示情形條件不允許使用預設值,則會使用第一個可見的值。
- 使用組態顯示情形條件對話方塊中的輸入項下拉清單來檢視其他的輸入項。您也可以選擇所有輸入項來檢視所有可用的輸入項。
- 當在對話方塊中顯示多個輸入項時,按一下三點按鈕來展開或摺疊所有輸入項。
- 您可以使用組態顯示情形條件對話方塊的預覽部分來做為測試您組態的試用場所。
- 取消選擇顯示隱藏的輸入項核取方塊來從對話方塊中移除反灰的輸入項。
- 取消選擇顯示隱藏的輸入項核取方塊來從對話方塊中移除反灰的輸入項。
-
在將經組態零件加入組合件中時,在「組態」面板中的隱藏輸入項是反灰的。
-
在「組態」選擇器中按一下
來為所有的輸入項開啟組態顯示情形條件對話方塊。按一下「組態」面板中的
來開啟該輸入項的對話方塊。

The examples in this section show a configured Part Studio. Functionality is the same for configured Variable Studios.

You can copy and paste a configuration input into and out of Part Studios, assemblies, and Variable Studios. This makes it quick and easy to share configurations between designs.
-
Open the Configuration panel in the Part Studio, assembly, or Variable Studio that contains the input to copy.
-
Click the input's three-dot menu and select Copy input or Copy all inputs.
-
Open the Configuration panel in the tab to paste the input.
-
Click the arrow next to Configure Part Studio/Assembly/Variable Studio and select Paste inputs .
輸入項即被插入至「組態」面板中。 -
Select the parameters to configure from the new tab. Continue reading to learn how to now copy input values and parameters into the input tables.
注意:
- You can copy and paste configuration inputs: between Part Studios, assemblies and Variable Studios; within the same document; and between different documents.
- 所有的名稱、顯示情形條件、FeatureScript ID、以及變數定義都會隨輸入項一起複製。
- 經複製的輸入項直到使用者登出之前都可使用。
- 系統不會維持複製輸入項與貼上輸入項之間的參考;一旦貼上之後,對原始組態的變更不會反映在貼上的輸入項中。
- 如果目標組態並沒有計算顯示情形所需要的所有輸入項,系統會自動修復 (移除) 貼上的顯示情形條件。
- 系統不會貼上有相同內部 FeatureScript ID 的組態輸入項。要解決這個問題,您可以刪除有相同內部 FeatureScript ID 的組態然後再次貼上。

您可以複製與貼入組態中或反向操作,以幫助輸入或編輯值。
複製值與參數:
- Open the
menu in the upper right corner of the Configuration panel.
- Select Copy table:
- 複製表格之後,您可以將其貼入試算表中:
請注意,欄名稱會與表格一起貼入 (如上所示)。您現在可以編輯表格,然後將其複製/貼回 Onshape 中:
- 僅選擇內有資料的列與欄 (不是欄名稱或標題),如下方藍色部分所示:
如果需要,您也可以使用額外的空白列來加長表格。只需要在選取複製指令時,將額外的列包含在試算表中。
- Issue a Copy command.
- 在 Onshape 組態表格中,按一下表格最左上方的儲存格。
- Issue a keyboard Paste command:
Onshape 會自動以所複製的資料取代組態輸入項表格列與欄內的任何資料。Onshape 同時會自動包括各個輸入項的預設單位。
注意,如果從試算表中複製的列數多於 Onshape 組態輸入項表格中的列數,則在貼上的操作中會包括多的欄。Onshape 會在操作的過程中建立列。
不過,如果從試算表中複製的欄數多於 Onshape 組態輸入項表格中的欄數,則在貼上的操作中不會包括多的欄。Onshape 不會在操作的過程中建立欄位。不過您可以在貼上之前於組態表格中建立額外的欄 (參數)。

- Click an input name to rename it.
- To remove a value or description from a configuration, right-click it in the Variable Studio and click Unconfigure or Unconfigure from.
- To modify options in a configuration input, right-click the row.
Select from one of the following options:
- Switch to - Set the configuration to the option specified in the selected row.
- Set as default - Set the selected row as the default for the input.
- Duplicate row - Copy the selected row and insert the copy into the table.
- Move up/Move down - Reorder the rows in the table.
- Delete row - Delete the row from the table.
- Delete column - Delete the column from the table. The first column cannot be deleted.
- To modify a configuration input table, click its three-dot menu on the right side of the Configuration panel.
Select from one of the following options:
- Copy table/inputs/all inputs - Copy and paste input tables and values. See Copying configurations.
- Move up/move down - Reorder the tables in the Configuration panel.
- Rename - Rename a configuration input. You can also click an input name in the Configuration panel to rename it.
- Edit internal IDs - Open a dialog to change the internal FeatureScript identifiers of the configuration input. When finished, select Break reference and change IDs.
- 顯示情形條件 - 請參考設定顯示情形條件。
- Expand/collapse all inputs - Expand or collapse all inputs in the Configuration panel.
- Delete - Delete the configuration input table.