Download the Onshape Mobile App

IOS Android
Onshape GUI with an overlay showing Query Variables
READ TIME:
00:00

When working with patterns, selecting geometry can become tedious and frustrating. Onshape’s Query Variable feature makes this task easier and more accurate.

Query Variables and Selection

Introduced in Onshape 1.203, the Query Variable allows you to create a parametric selection group for use in a Part Studio. They find and store geometry – vertices, edges, faces, or bodies, without the need for repeated, manual clicking. Using query variables, there are a variety of tools that can assist you to make selections. More documentation on the use of query variables can be found here.

This Tech Tip focuses on the Created by option and how it can be powerful for patterned features and parts. To explore the model featured in this Tech Tip, you can view and copy this document.

Created By

The Created by option within query variables gathers all entities built by a specified upstream feature. These entities can be vertices, edges, faces, or parts.

With Add additional queries, selections are further refined for union, subtraction, and intersection operations. In this case, the additional query subtracts the edges of the tire tread that touch the surface of the tire. We can use this variable to fillet the edges of the tread.

  1. Union - Entities from selection A and B
  2. Subtraction - Entities from A minus B
  3. Intersection - Only entities from A and B

You can also select multiple features with the Created by option, allowing you to group the various resulting entities into one selection.

Updates Propagate Downstream

Any change made to the query variable will propagate to all downstream features. The Final button can be used to preview downstream changes.

Patterned Features & Parts

Created by is very useful in the context of patterns. Rather than having to manually select certain entities (vertices, edges, faces) of a feature or part, you can use this tool.

In the example of the bike tire, the edges of the tread are filleted. To do this task without query variables and the Created by option would mean selecting each individual edge, over and over again, with the possibility of missing an edge. Instead, this task was completed easily and accurately in just a few seconds.

With Configurations

Query variables and Created by are also useful when working with configurations.

In this example, I have configured the query variable #Design to toggle between Design A and B. By tying the tread’s design to a query variable and using Created by, the downstream features that detail the tread update seamlessly.

For more, head to the Onshape Learning Center to become an expert on all things Onshape and 3D modeling using CAD.

The Onshape Learning Center

Take self-paced courses, read articles, or sign up for an instructor-led training session.

Latest Content