Modeling In Context
Available in: Part Studio, Assembly
Enables the user to select and edit a part in Part Studio in context to the other parts in the Assembly. Unselected parts cannot be edited in the Part Studio and appear transparent.
Modeling a part in the context of surrounding parts is a powerful way to design top-down. Onshape provides a few methods of designing parts top-down. Each method has its own strengths, so you might want to use different methods for different designing scenarios:
- When you have one or more a pre-existing parts and Part Studios, use in-context modeling (explained in this topic). This is used when relationships between parts that were created in separate Part Studios, or even in different (linked) documents are needed.
This is also a good option when geometric relationships are dependent on assembly position. This often occurs when your Assembly already exists and you need to make some in-context edits to one of the parts. This approach also scales well to large assemblies, when it's not feasible to have one parametric history drive all the parts.
- If you have an Assembly and wish to create a new part in a new Part Studio in context, use the Create Part Studio in context tool.
- Use Onshape multi-part Part Studios when you have a strong understanding of your design intent at the start of your design process, and you want to use the power of a single parametric history to drive several inter-related parts.
Revision reference instances cannot be edited in context. Using an instance that is a Version reference or a workspace reference is allowed.
To learn more about in context design, you can follow the self-paced course here: Managed In Context Design (Onshape account required).
Editing a Part Studio within the context of an Assembly is initiated from the Assembly:
- Open an assembly that contains multiple parts. In the Instances list or graphics area, right-click the part to edit (the primary instance) and select Edit in context:

If contexts already exist for the part, select Edit in context, and then select an existing context or Create new context from the menu:

- The Part Studio containing that part opens, with the part highlighted in the Parts list. The other assembled parts are shown transparently around the primary instance in the same spacial relationship as in the assembly. The assembly's current view orientation, zoom, and active section view are preserved.

See Make Transparent for more information on making Part Studio or Assembly entities transparent.
- As you edit, selecting a reference point on another part in the assembly (other than the primary instance) does the following:
- An Assembly context (snapshot) is created.
- All the geometry and positions of the components is captured in the Assembly (and the information is stored in the Assembly context snapshot).
- If this is the first Assembly context created in this Part Studio, the Assembly contexts list is created above the Features list in the Part Studio (where the snapshot is located). Otherwise, the current context is added to this Assembly contexts list.
-
Make edits as desired, referencing faces, edges, or parts of the Assembly as needed. (Note that nothing automatically updates, you can manually update your Part Studio or Assembly when you want. See Update context, below.)
Manage all the contexts that include this Part Studio in the Contexts panel.
You can also create multiple Contexts of the same Assembly in various articulated positions and update a Context manually in the Part Studio or Assembly. You can also switch between them and rename them.
- Click Done in the yellow banner to save your changes and stay in the Part Studio. To save the context and navigate back to the assembly, do one of the following:
- Click Hide/show instances > Go to assembly in the yellow banner.
- Select the assembly tab at the bottom of the window.
- Right-click in the empty space and select Go to assembly.
For example, if you rotate the primary instance around the axis of a ghosted part from the Assembly, when the ghosted part's axis is selected, it acts as the reference point for the context, and a new Assembly context is created.
You are able to use as many reference points as needed (selected reference points are highlighted in purple). These references are never lost or broken, so your parts never fail.
| 1 | List of Contexts objects in this Part Studio and the Update context button ( |
| 2 | Options to return to the assembly or hide and show instances; click Done to save the context; use the slider to increase or decrease the transparency of ghosted parts |
| 3 | Ghosted parts in the assembly at the time Edit in context was initiated |
| 4 | Newly created Feature (Transform) referencing the line of the assembled parts (shown in both the Features list and the graphics area) |
| 5 | Opaque parts originally created in this Part Studio, in the position they were created, highlighted in yellow |
| 6 | Reference line from the ghosted part used for the Transform feature, highlighted in purple |
| 7 | Click the Contexts icon ( |
Edits are now visible in the Assembly.
The shears and handles shown in Main Assembly are defined in separate Part Studios. Notice that the blade and limit plate do not meet:
To ensure that the limit plate and blade meet, select the limit plate (the part to edit), right-click and select Edit in context to open the Part Studio in which the limit plate was created, visualized with the assembly:
Extrude up to face, using the blade as a reference point for the Extrude feature:
Return to the Assembly (click Go to assembly) and see the edits there.
If the design intent was clear at the outset, all the parts could have been designed in a single Part Studio. This example assumes the assembly had already been built with parts from different Part Studios, so Edit in context is the best option.
You can create a new Part Studio using the present Context of the Assembly with the Create Part Studio in Context Assembly tool.
In a Part Studio, click the Contexts icon (
) on the right to see every assembly context for the Part Studio in a table with the following columns:
- Name - Double-click to rename the context.
- Assembly - A link to the assembly, which opens in the context’s configuration, including assemblies in other documents.
- Named position - Click to select a named position from the dropdown to follow. Current assembly position is the default.
- Primary instance - The assembly instance (or the feature name for an origin or mate connector).
- Affected parts - Parts created from the context, including parts made by later features built on in-context geometry (for example, a sheet metal part converted from an in-context extrude).
Hover over a cell in the Affected parts or Primary instance column to highlight those parts in the graphics area and their features in the Feature list. The active context is marked with a blue bar. An out-of-date context shows a blue dot.
Right click a cell in the Assembly column to:
- Switch to assembly - Switch the assembly tab in which the context is defined.
- Change assembly configuration (configured assemblies only) - Opens the same Change configuration dialog used in assemblies. Changes apply immediately, and Cancel reverts them. See Changing configurations for details.
Right-click a row to see the context menu:
- Activate - Inactive contexts only.
- Hide/show context instances - Active context only. Opens the Hide/show context instances dialog, where you can filter the assembly instances and toggle their visibility. You can also hide, show, and select Mate connectors in context.
- Restore context view state - Active context only. Restores the context view back to its original visibility.
- Update - Update the context.
- Duplicate - Duplicate the context. The duplicate is created as inactive, and the original stays active.
- Delete - Delete the context.
Click Update all out of date contexts at the bottom of the panel to update every out-of-date context.
The table is read only in versions, in view-only documents, in delayed regeneration mode, in repair mode, and while the Insert dialog or another operation is open. In those cases the context menu options and the update buttons are unavailable.
Errors in the Contexts panel include:
- If the context’s assembly was moved or deleted, the row stays and the Assembly cell shows Missing reference.
- If the named position no longer exists or cannot be found, the Named position cell shows Named position not found. Select a valid position.
- You can turn off a Context to make unrelated edits at any time by selecting None in the Assembly contexts list above the Feature list.
- Parts created without referencing the part being edited in-context are not automatically inserted into the Assembly.
-
If there are multiple contexts, when a context is selected from the Assembly contexts dropdown at the top left, the features associated with the context are indicated by the in-context arrow icon highlighted in yellow. In the example below, when Context 1 is selected from the dropdown, the Extrude 2 feature's arrow icon is highlighted yellow, indicating it is associated with this context. When Context 2 is selected from the dropdown, the Extrude 3 feature's arrow icon is highlighted yellow.
-
You can also click Y when editing a context to hide currently selected parts in the Instances list or graphics area.
-
In the same way that the assembly's current active section view is preserved when editing the Part Studio in context, the reverse is also true; if the user creates a section view in the in-context Part Studio and then returns to the assembly, the section view is preserved in the assembly.
-
An entity must be referenced for the assembly context to persist in the Part Studio after closing the context.
Once you have created a Context, you can make changes either in the Part Studio or in the Assembly and choose to update that Context in the Part Studio if you wish. This enables you to work in a Context in the Part Studio and not affect your Assembly unless you want to update your Assembly with the changes. The same is true for changing the Context from within an Assembly. You can make changes to the Assembly, then switch to the Part Studio and update the Context there to view the changes if you wish. Updates are never applied automatically.
To update a context in an assembly: Select the part edited in context, right-click and select Update context. Then select the context you want to update:
To update a context in a Part Studio:
Right-click the row's Assembly cell in the Contexts panel and select Update <context name>; or click the Assembly contexts dropdown, select the context, and click the Update context button (
).
Update Notification
While in the context, if a change is made to a feature on which the context is based, a filled blue circle appears in the Assembly contexts list and in the Contexts panel in the Part Studio. In the assembly, the blue circle appears next to the part in the Instances list.
For example, if an extrude is applied to a part prior to, and on which the context relied, you will see the icon. In the Assembly, this icon is visible next to the in-context part and any subfolder to which it belongs, along with a tooltip to indicate the update is available and for which contexts. If there are more than three contexts, the tooltip indicates the first two contexts with "and more" as a suffix.
Example
The original Context below was created with a straight purple blade:
The blade was then edited to have a curved edge:
In the Assembly, select Update context (of the limit plate) to update the shears with the curved blade. Since the limit plate was extruded up to the face of the blade, when updated, the limit plate is recalculated up the face of the new, curved blade:
This example shows a Part Studio with two Contexts: one that references a ball valve in the closed position, and another that references the ball valve in the open position. A stop is modeled in each Context, so the final design has a stop for the open position and the closed position.
In the Part Studio, the ball valve in the closed position, in context:
In the Part Studio, the ball valve in the open position, in context:
The final design of the stop mechanism in the Part Studio:
Set primary instance
The primary instance is created when you edit a part in context and is indicated by a solid arrow beside the feature in the Feature list (in the Part Studio) and beside the part in the Instances list (in the Assembly). The primary instance defines the anchor part (the part selected for the Edit in context command) for the placement of the ghosted assembly in the Part Studio; all other assembly components appear in the Part Studio in relationship to that primary instance.
You have the ability to change the primary instance of a Context at any time and may wish to do so especially in the case of a broken or missing primary instance:
- In the Assembly, select a part.
- Right-click to access the menu, and select <context name> > Set as primary instance.
The new primary instance is marked with a solid arrow
in the Parts list, and the previous primary instance (if present) is marked with a dashed arrow
.
Note that the Primary instance of a context does not show as a ghosted part of the context.
Selecting a workspace to edit
When working in one workspace and inserting a part from a version, when you select to Edit in context, the Select a workspace to edit dialog opens (since you cannot edit the part in an immutable version). This allows you to select the specific workspace in which to edit the part:
In the dialog, select the specific workspace (Main or B2, in this case) in which to edit in context.
The images below are from iOS. The workflow is the same for both iOS and Android.
Context objects are listed just above the Feature list in the Part Studio, shown below:
When editing in context, you are able to make as many references as you'd like to any of the parts in the assembly; those references will never be lost or broken, so your part will never fail.
You are also able to create multiple Contexts of the same Assembly in various articulated positions and update a Context, manually, in the Part Studio or Assembly if desired. Updates are never automatic; you control if, when, and what to update through the Update context command. This prevents accidental changes to in context parts that might occur as a result of moving or redefining other parts in the Assembly.
In the Assembly, select Edit in context from the context menu of the part you want to edit. The Part Studio containing that part opens. The assembled parts are visualized in the Part Studio (ghosted) around the primary instance in the same spacial relationship as in the Assembly. In addition, all parts originally in the Part Studio are displayed, opaque, placed as they were created.
For example, the shears and handle shown below are defined in separate Part Studios. Notice that the blade and limit plate do not meet:
To ensure that the limit plate and blade meet, select the limit plate (the part to edit), open the context menu and select Edit in context to open the Part Studio in which the limit plate was created, visualized with the assembly:
Extrude up to face, using the blade as a reference point for the Extrude feature. Return to the Assembly (tap Go to assembly) and see the edits there.
If the design intent was clear at the outset, all the parts could have been designed in a single Part Studio. This example assume the assembly had already been built with parts from different Part Studios, so Edit in context is the best option.
When editing and/or replicating a Part Studio in context, the assembly's current active section view is preserved.
If a section view is created within an in context Part Studio and then you return to the assembly, the section view is preserved in the assembly.
Editing a Part Studio within the context of an Assembly is initiated from an Assembly:
- Open an Assembly that contains multiple parts. In the Instances list or graphics area, double-tap the part to edit (the primary instance) and select an existing context or the Create new context option from the menu.
The Part Studio containing that part opens, with the part highlighted in the Parts list. The other assembled parts are shown transparently around the primary instance in the same spacial relationship as the assembly. The assembly's current view orientation, zoom, and active section view are preserved.
- As you edit, selecting a reference point on another part in the Assembly (aside from the primary instance) results in the following:
- An Assembly (context) snapshot is created.
- All the geometry and positions of the components is captured in the Assembly (and the information is stored in the Assembly context snapshot).
- If this is the first Assembly context created in this Part Studio, the Assembly contexts list is created above the Features list in the Part Studio (where the snapshot is located). Otherwise, the current context is added to this Assembly contexts list.
For example, if you rotate the primary instance around the axis of a ghosted part from the Assembly, when the ghosted part's axis is selected, it acts as the reference point for the context, and a new Assembly context is created.
You are able to use as many reference points as needed (selected reference points are highlighted in purple). These references are never lost or broken, so your parts never fail.
- Make edits as desired, referencing faces, edges, or parts of the Assembly as needed. (Note that nothing automatically updates, you can manually update your Part Studio or Assembly when you want. See Update Context
below.)
You can also create multiple Contexts of the same Assembly in various articulated positions and update a Context manually in the Part Studio or Assembly.
- When finished editing, navigate back to the Assembly in any of the following ways:
- Tap Go to assembly at the top of the Graphics area.
- Select the Assembly tab at the bottom of the window.
Note the edits are visible in the Assembly.
Once you have created a Context, you are able to make changes either in the Part Studio or in the Assembly, and choose to update that Context in the Part Studio if you wish. This enables you to work in a Context in the Part Studio and not affect your Assembly unless you want to update your Assembly with the changes. The same is true for changing the Context from within an Assembly. You have the ability to make changes to the Assembly, then switch to the Part Studio and update the Context there to view the changes if you wish. Updates are never applied automatically.
To update a Context in an assembly: Select the part edited in context, access the context menu and select Update context. Then, select the context you want to update.
To update a Context in a Part Studio: Select the Context in the Assembly contexts list, tap the horizontal-dot menu and select Update context.
Update notification
This feature is currently only available on browser and iOS platforms.
While in the context, if a change is made to a feature on which the context is based, a filled blue circle icon appears next to the Assembly contexts label at the top left, and any context in the dropdown menu (shown in the first image below).
For example, if an extrude is applied to a part prior to, and on which the context relied, you will see the icon. In the Assembly, this icon is visible next to the in-context part and any subfolder to which it belongs, along with a tooltip to indicate the update is available and for which contexts. If there are more than three contexts, the tooltip indicates the first two contexts with "and more" as a suffix.
Set primary instance
The primary instance is created when you edit a part in context and is indicated by a solid arrow beside the feature in the Feature list (in the Part Studio) and beside the part in the Instances list (in the Assembly). The primary instance defines the anchor part (the part selected for the Edit in context command) for the placement of the ghosted assembly in the Part Studio; all other assembly components appear in the Part Studio in relationship to that primary instance.
You have the ability to change the primary instance of a Context at any time and may wish to do so especially in the case of a broken or missing primary instance:
- In the Assembly, select a part.
- Open the context menu and select the Context and then Set as primary instance.
The new primary instance is marked with a solid arrow in the Parts list, and the previous primary instance (if present) is marked with a dashed arrow.
Rename Context
Context objects are given a default name when they are created. To avoid confusion, rename each Context with meaningful names as it is created.
In the Part Studio that contains the Context object:
- In the Assembly Contexts list (located above the Feature list), select the Context from the dropdown.
- Tap the vertical-dot menu that becomes active when the Context name is selected.
- Select Rename.
- Type a new name and tap the checkmark.
Exit edit in context
Use this command when you want to end an edit in context session and return to the Part Studio without a Context and without creating a Context object.
While editing in context in the Part Studio:
Tap the x in the gold banner at the top of the graphics area.
Selecting a workspace to edit
When working in one workspace and inserting a part from a version, when you select to Edit in context, the Select a workspace to edit dialog opens (since you are not able to edit the part in an immutable version). This allows you to select the specific workspace in which to edit the part.