装配体配置
In Onshape, you can create your own configurations inside an assembly regardless of whether or not you have Part Studio configurations. They are altogether separate and neither impacts the other.
Assembly configurations work mechanically the same way as Part Studio configurations. The difference is that in an assembly, you can only configure mates (not mate connectors), instances, and patterns.
当多个人在同一文档中工作时,每个人都会看到自己选择的配置,但在跟随模式下工作时除外,那时,跟随者会看到引领者选择的配置。
To learn more about assembly configurations, you can follow the self-paced course here: Assembly configurations (Onshape account required).
Below is an example of an assembly with the Configuration panel icon on the right side of the window, shown below to the right of the red arrow:

通过工作区内的零件实例或装配体,打开“配置”面板:
- 单击图形区域右侧的
(如下所示)
-
配置面板将打开:
- Click
:
- Click in the first row to activate it and enter the names of the input in the Name column. For example, to configure a pattern on a part, you might name the rows 2x2 and 4x4. Use Tab to move from one row to the next.
活动的行用行左侧的蓝条来指示。
- 若要为指定行配置输入值,请单击
。
- Select the mate, instance or pattern that contains the parameter (click it in the Assembly list) and select the parameter in the dialog that opens (shown below outlined in red). The parameter is then outlined with a broken yellow line and a new column is created for that input in the configuration (shown below, in the Configuration panel, to the left of the red arrow).
列名称默认为选定图元的名称(作为顶级标题)加上输入框名称(作为从属级标题)。在本例中,Box <1> 是选定的图元,输入框名称已由用户更改为 2 x 2 和 Long。
- To edit a configured parameter:
- 如果输入是已输入的值,请单击表格中的行并输入新值。
- 如果输入是对话框中的一项选择,请双击表中的行以打开特征对话框。
特征对话框中的相应输入框将以蓝色亮显。针对此输入,在模型上或在实例列表中进行选择。
- When finished defining the configurations, click the Done button in the orange message at the top of the window, or close the dialog box.
- 对于每一行,重复步骤 6 至 8。
- Repeat steps 5 through 8 to add another feature to the configuration.
- 要使用模型测试输入,请在配置下的特征列表中,使用向下箭头从菜单中进行选择:
默认情况下,“配置”左侧的插入符号会展开(如上所示,在红色箭头的右侧),当您完成面板的某个部分后,单击插入符号可折叠该部分。
将鼠标悬停在特征对话框中的输入框上,查看可以配置哪些特征。当您将鼠标悬停在可供配置的特征上时,这些特征将以黄色亮显。
模型应该相应地更新。如果未更新,请检查设计意图的模型和配置定义以进行精确选择。

Onshape has a mechanism for also configuring assembly properties for each of the configuration inputs you have previously defined, directly from the Configuration panel. The properties available to be configured include: name, description, part number, revision, vendor, project, product line, title 1, title 2, title 3, not revision managed, and exclude from all BOMs.
配置装配体属性:
- 使用“配置”面板中的现有配置输入,单击面板顶部的
(如下所示,以蓝色勾勒轮廓):
- 单击
。
- 选择您希望配置的装配体属性(属性包含在列表中)。(本例使用“项目”。)
将创建一个表,之前选择的配置输入在第一列中,属性在第二列中:
- 在“配置”列中,使用向下箭头从配置选项列表中进行选择。
- 在“项目”(项目属性)列中,输入名称。
- 要为另一配置选项添加更多零件属性,请单击
。
- 从第一列中选择一个新的配置选项。
- 在“项目”(项目属性)列中,输入名称。
- 根据需要进行重复以针对必要的配置选项配置属性。
当配置零件编号属性时,您可以右击并选择“生成新零件编号”,当(通过您的 Professional Company 设置 > 编号方案或 Enterprise 设置 > 编号方案)开启自动生成零件编号时:
要更改配置的名称,请单击该名称(“配置”),然后键入新名称。在编辑框外侧单击即可保存。

将具有配置的零件插入装配体后,您可以在任何设备上更改其配置:
- 右键单击零件(或“实例”列表中的零件名称),然后选择更改配置。
“更改配置”对话框随即打开:
- 选择新的配置选项。
- 当您对选择的内容满意时,请单击
。(使用
可取消操作。)
对于 iOS 和 Android 设备,轻按三个点菜单并选择“更改配置”以访问配置下拉菜单并选择其他配置。轻按“生成”按钮可生成零件的新配置。


You can copy and paste a configuration input into and out of a Part Studio or Assembly. This makes it quick and easy to share configurations between designs.
-
Open the Configuration panel in the Part Studio or Assembly 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 Part Studio or Assembly to paste the input.
-
Click the arrow next to Configure Part Studio/Assembly and select Paste inputs.
The inputs are inserted into the Configuration panel. -
Select the parameters to configure from the new Part Studio or Assembly. Continue reading to learn how to now copy input values and parameters into the input tables.
Notes:
- You can copy and paste configuration inputs: between Part Studios and Assemblies, within the same document, and between different documents.
- All names, visibility conditions, FeatureScript IDs, and variable definitions are copied with the input.
- Copied inputs are available until the user logs out.
- References between the copied input and pasted input are NOT maintained; after pasting, changes to the original configuration input are NOT reflected in the pasted inputs.
- Pasted visibility conditions are automatically repaired (removed) if the target configuration does not have all the inputs needed to compute the visibility.
- Configuration inputs with the same internal FeatureScript IDs are not pasted. To fix this, you can delete the configuration input with the same internal FeatureScript ID and paste again.

You can copy and paste into and out of a configuration, to aid in entering or editing values.
To copy values and parameters:
- Open the
menu in the upper right corner, next to +Configure features.
- Select Copy table:
- Once you have copied the table, you can paste it into a spreadsheet:
Note that the column names also come in with the table, as shown above. Now you can edit the table and copy/paste it back into Onshape:
- Select just the rows and columns with data (not the column names or headings), as shown in blue below:
You can also pad your table with extra empty rows, if you wish. Just include the extra rows in the spreadsheet when selecting for the copy command.
- Issue a Copy command.
- In the Onshape Configuration table, click the top, left cell of the table.
- Issue a keyboard Paste command:
Onshape automatically replaces whatever data was in the rows and columns of the configuration input table with the data that was copied. Onshape also includes the default units for each input, automatically.
Note that if there are more rows copied from the spreadsheet than are in the Onshape configuration input table, those rows are included in the paste. Onshape creates the rows on the fly.
However, if there are more columns copied from the spreadsheet than are in the Onshape configuration input table, those columns are not included in the paste. Onshape does not yet create columns on the fly. You can, however, create additional columns (parameters) in the configuration table before pasting.

本节中的示例显示了已配置的 Part Studio;使用已配置的装配时,功能是相同的。
您可以调整配置输入参数可见的条件。
考虑一个带有两个配置输入的零件:高度和宽度。
默认情况下,任意高度的零件可以将宽度设置为任意值。但是,假设超宽度仅适用于“较高”高度。在这种情况下,我们可以设置“宽度”输入参数可见的条件。
- In the Configuration panel, click the configuration's three-dot button, and select Visibility conditions from the menu.
“配置可见性条件”对话框打开。右侧面板显示当前选定配置的预览。您可以在此面板中更改所选选项以预览您的设置。 - 单击“添加条件”。
- 单击第一个下拉菜单,然后选择应控制此输入参数可见性的参数。在此示例中,我们将选择“高度”输入参数。
- 单击第二个下拉菜单,然后选择输入参数可用的条件。在此示例中,“宽度”输入参数仅适用于“较高”高度。右侧的预览会更新以反映您的选择。在下图中,您可以看到“宽度”输入参数不再适用于“较低”高度。
- 单击“保存”。现在,“宽度”输入参数仅在选择“较高”高度时可见,“宽度”输入参数表显示可见性条件图标
。
设置多个条件
配置条件是累加的;如果我们在上面的示例中添加第三种配置并设置下图所示的条件,则“大圆角”选项将仅适用于同时具有“较高”高度和“超宽”宽度输入参数的零件。
当将“较高高度”设置为“默认宽度”时,“圆角”配置将被隐藏。
配置输入参数只能控制“配置”面板中显示在其下方的输入的可见性。在我们的示例中,“宽度”输入参数可以由“高度”输入参数控制,但不能由“圆角”输入参数控制。
提示
-
您设置的可见性条件可在所有“插入”对话框中找到(即,将配置的零件插入到装配体中时)。
-
隐藏的输入参数始终有其默认值。在上面的示例中,即使未设置宽度选项,“较低高度”和“中等高度”的零件也具有“默认宽度”。
-
(仅限零件和 Part Studio):已从特性中排除的配置输入只能控制其下方其他输入的可见性,这些输入参数也已从特性中排除。在下面的示例中,如果将“宽度”排除在特性中(由图标
指示),则只有当“圆角”也从特性中排除时,它才能控制圆角的可见性。
- 使用“配置可见性条件”对话框中的“输入”下拉菜单来查看其他输入参数。您可以选择“所有输入”来查看所有可用输入参数。
- 您可以将配置可见性条件对话框的预览部分用作操场来测试您的配置。
- 选中“显示隐藏的输入参数”复选框以在“配置可见性条件”对话框中显示灰色的输入参数。
-
单击配置选择器中的
打开所有输入参数的“配置可见性条件”对话框。单击配置面板中的
以打开该输入参数的对话框。
-
对可见性条件所做的更改会自动反映在引用配置元素的所有现有文档中。

将具有排除配置的零件插入到装配体中时,您将在该零件旁边看到“从属性中排除”图标。