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.
[コンフィギュレーションの可視性条件] ダイアログでは、コンフィギュレーションにロジックを追加できるため、特定の入力やオプションをいつ利用可能にするかを制御できます。

[高さ] と [幅] の 2 つの入力があるパーツを考えてみましょう。
既定では、どの高さのパーツにも任意の幅を設定できます。ただしここでは、高さを [高い] に設定した場合にのみ、幅を [エキストラワイド] に設定できるよう限定するには、[幅] の入力を表示する条件を設定できます。
- [コンフィギュレーション] パネルで、入力の 3 点ボタンをクリックし、メニューから [可視性条件] を選択します。
[コンフィギュレーションの可視性条件] ダイアログが開きます。右側のパネルには、現在選択しているコンフィギュレーションのプレビューが表示されます。このパネルで選択したオプションを直接変更して、設定をプレビューできます。 - [条件を追加] をクリックします。
- 最初のドロップダウンをクリックし、この入力の可視性を制御する入力を選択します。この例では、高さの入力を選択します。
- 2 番目のドロップダウンで、特定のオプションを選択する場合は [が次の場合]、オプションの範囲を選択する場合は [が次の間の場合] します。
- が次の場合: 表示される 3 番目のドロップダウンをクリックし、入力に許可するオプションを選択します。
- が次の間の場合: 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.
この例では、幅の入力は高さを [高い] にした場合のみ使用できます。右側のプレビューが更新され、選択内容が反映されます。下の画像では、高さを既定値に設定すると幅の入力が使用できないことがわかります。
- [保存] をクリックします。これで、幅の入力は高さを [高い] にした場合にのみ表示され、幅の入力テーブルには可視性条件アイコン
が表示されます。

[コンフィギュレーションの可視性条件] ダイアログのオプションルール設定を使用して、特定のオプションを表示する条件を指定できます。
オプションルールのロジックはリスト入力にのみ設定できます。
- [コンフィギュレーションの可視性条件] ダイアログで、入力内容を展開して [オプションルールを追加] をクリックします。ダイアログに新しいセクションが表示されます。
- [表示] 行に、制御するオプションを選択します。
- オプション: 表示されるドロップダウンをクリックし、条件を設定するオプションを選択します。
- 範囲: 最初のドロップダウンをクリックし、範囲の最初のオプションを選択します。2 番目のドロップダウンをクリックして、範囲内の最後のオプションを選択します。範囲は特定のオプションが含まれます。範囲は重複していてもかまいません。
- [条件] 行で、次を選択します。
- 最初のドロップダウンから入力を選択します。
- 特定のオプションを選択する場合は [が次の場合]、オプションの範囲を選択する場合は [が次の間の場合] を選択します。
- が次の場合: 表示されるドロップダウンをクリックし、オプションに指定可能な値を選択します。
- が次の間の場合: 最初のドロップダウンをクリックし、範囲内で最初に許可するオプションを選択します。2 番目のドロップダウンをクリックして、範囲内で最後に許可するオプションを選択します。
-
[条件を追加] をクリックし、この一連の手順を繰り返して、コンフィギュレーション内にロジックを追加していきます。
オプションルールの各条件は AND ステートメントで組み合わされます。すべての条件が満たされなければ、制御されたオプションは表示されません。
- もう一度 [オプションルールを追加] をクリックして、他のオプションの条件を追加します。
- [保存] をクリックします。
以下の例では、[深い] オプションは面積が [既定] 以上の場合のみ使用できます。[標準] オプションは面積が [大]、[既定]、または [小] の場合のみ使用できます。[浅い] オプションは面積が [小] か [より小さい] の場合のみ使用できます。
次の例では、重複する範囲を使用して可視性条件を指定しています。
以下の例では、オプション制御と範囲制御を組み合わせて必要なロジックを設定しています。

入力条件は付加的です。上の例に 3 つ目のコンフィギュレーションを追加し、下図のように条件を設定した場合、[大きなフィレット] オプションは高さを [高い] に、幅を [エキストラワイド] に設定したパーツに限定して使用できます。
[高い] に対して既定の幅を設定すると、フィレットのコンフィギュレーションは非表示になります。
コンフィギュレーション入力は、コンフィギュレーションパネルでその下に表示される入力の可視性のみ制御できます。この例では、[幅] の入力は [高さ] の入力で制御できますが、[フィレット] の入力では制御できません。

必要な入力またはオプションが見つからない場合、可視性条件は自動的に修復 (削除) されます。
たとえば、[幅] の入力の可視性が [高さ] の入力に依存しており、[高さ] の入力が削除された場合、[幅] の可視性条件は自動的に削除されます。同じことが、削除または移動された個々のオプションにも当てはまります。この例では、[高さ] の入力も [フィレット] オプションから削除されます。
ワークスペースに警告が表示され、ダイアログから条件が削除されます。

-
設定した可視性条件とオプションルールは、すべての [挿入] ダイアログ (つまり、構成したパーツをアセンブリに挿入する際) で使用できます。可視性条件の変更は、構成された要素を参照する既存のすべてのドキュメントに自動的に反映されます。
-
非表示の入力には常に既定値があります。このページの最初の例では、[幅] オプションを設定しなくても、[高さ] が低いパーツと中程度のパーツは [幅] は [既定] になります。
-
コンフィギュレーション入力に可視オプションがない場合、その入力は非表示となり、既定値になります。
-
-
入力またはオプションを折りたたむと、可視性条件の概要がダイアログに表示されます。
-
(パーツと Part Studio のみ): プロパティから除外されたコンフィギュレーション入力は、その下にある他の入力のうち、同じくプロパティから除外された可視性のみ制御できます。以下の例では、プロパティから幅が除外されている場合 (
アイコンで表示)、フィレットもプロパティから除外されている場合にのみ、フィレットの可視性を制御できます。
-
(パーツと Part Studio のみ): プロパティから除外されたコンフィギュレーション入力は、リリースパッケージおよびリビジョン参照値では既定値として扱われます。可視性条件により既定値を使用できない場合は、最初に表示された値が使用されます。
- 他の入力を表示するには、[コンフィギュレーションの可視性条件] ダイアログで [入力] ドロップダウンを使用します。[すべての入力] を選択すると、使用可能なすべての入力が表示されます。
- ダイアログに複数の入力が表示されている場合は、3 点ボタンをクリックしてすべての入力を展開または折りたたみます。
- [コンフィギュレーションの可視性条件] ダイアログのプレビューセクションは、コンフィギュレーションをテストするためのプレイグラウンドとして使用できます。
- グレーで表示されている入力をダイアログから削除するには、[非表示の入力を表示] チェックボックスをオフにします。
- グレーで表示されている入力をダイアログから削除するには、[非表示の入力を表示] チェックボックスをオフにします。
-
構成済みパーツをアセンブリに追加すると、非表示の入力は [コンフィギュレーション] パネルにグレーで表示されます。
-
コンフィギュレーションセレクタで
をクリックして、すべての入力の [コンフィギュレーションの可視性条件] ダイアログを開きます。設定パネルで
をクリックして、その入力のダイアログを開きます。

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.