Download the Onshape Mobile App

IOS Android
Onshape GUI with an overlay showing a rolling bearing and its parameters.
READ TIME:
04:46

Summary

  • Add more detail to your first custom feature build so it’s ready for company reuse.
  • Simple UI rules, composite parts, and automated metadata make each item easy to find and insert.
  • Versioning, branching, and compare let you test FeatureScript changes safely before they reach production.

The combination of the FeatureScript MCP server from Onshape Labs and custom standard content libraries makes it easier than ever to populate libraries with items from manufacturer catalogs or internal company standards.

In the first part of this series, “How to Prepare Part Catalog Data for Onshape Custom Standard Content Libraries,” I showed you how to get started with a custom feature for custom standard content, and now it’s time to iterate on that first design.

Custom Feature UI Tips

When building the UI for your custom feature, a few simple tips can go a long way toward ensuring it meets Onshape’s requirements for standard content.

Valid Selection Types

Your feature should only include dropdowns, checkboxes, and number inputs; standard content doesn’t support text, queried selections, or array indices.

Selection Ordering

Your top input should always be either the highest-order selection parameter type/standard or the unit of measure (UoM) selection (if applicable), and then cascade to more specific selection options that filter as you select.

  • If you have a completely different type of content in a single feature that depends on UoM in your feature, do UoM first (this could also be an area where you could separate your catalog into two different custom features or documents).
  • If you have a standard that covers both imperial and metric units, do the standard and then the UoM.

Readability

If your dropdown has more than 500 possible options, split them out into a series for a better user experience.

Example: SKF bearings have tables that show in increments of millimeter ranges that range from 3mm to 1500 mm, so I split the different series into how they’re listed on the spec sheet.

Input labels should be short, descriptive terms, and option labels should be just the value.

Example: My bearing custom feature only has ID Size Range, Designation, Capping Category, and Closure Type as the input labels, and the values with them live in the dropdown.

Use Available Examples

Provide your LLM with a few examples of existing company or public custom features as ideal examples for your UI. These can be found within the FeatureScript Samples and Community Spotlight libraries in the Add custom features option in your toolbar, or at the Onshape custom feature webpage.

Handle Multi-Part Products as a Single Part or Composite Part

All custom standard content items must be single parts for them to be allowed in your company standard content library. In cases where you have multiple parts, instruct your custom feature to create a closed composite part that applies all product-specific metadata to this new composite, preserving visible detail while keeping it as a single OTS item in your BOM.

Example: While a ball bearing can contain a cage, balls, races, and seals, the important thing to have in your BOM is the bearing with its catalog number. By setting this as a composite part, all the elements of your bearing are kept in your design, but the line item in the BOM shows it as Bearing 604-2Z.

Prepare Your Part for Library Reuse

Since this is a company standard content library, many end users will use these components in their designs. The metadata of these components appears in the BOM for assemblies and on drawings, so the more you can automate this process, the better. You can also iterate on how metadata is added to your part, just like with geometry.

If you want to take advantage of Snap Mode, you can place explicit mate connectors at the possible insertion point(s) of your part directly through your custom feature, or add a toggle in the UI if you’d like control over when this happens.

Take Advantage of Onshape’s PDM Capabilities

You can prompt your LLM to build a change log into each iteration of your custom feature, but don’t forget about Onshape’s built-in versioning capabilities. You can either manually create a new version to preserve each iteration your code goes through, or give your LLM access to Onshape’s REST API for creating versions automatically.

Note: If you choose to automate this, it pulls from your company’s API allocation.

If you ever decide you want to go back to a previous version of your Feature Studio, or your LLM creates one that causes an error, you always have previous versions in Onshape to restore to.

Onshape’s branching ability also allows you to treat custom feature development like you’d handle code in a software development environment. As you iterate on the FeatureScript that drives your custom feature, use branches as sandboxes to test your new code before deploying changes to production.

Example: I want to add face colors to each to provide clearer visual indicators of the seals versus races, but I’m not sure whether I want to add them to my production code.

To understand the changes that have taken place in your code, you can use Onshape’s compare capability to look at a differential of the code in your Feature Studio or the geometric result of your custom feature.

Once you’re happy with the result of your latest iteration of code, you can merge your changes into your main workspace. This is only possible with Onshape’s built-in PDM capabilities, which help you keep track of all the iterations you may make during your design process.

Finalize Your Custom Standard Content Feature Standards

This series of Tech Tips has covered plenty of tips for how to improve your efficiency when creating custom features to drive custom standard content, but don’t forget about the most important part – building your library!

Once you find which tips work best for your custom features, continue building your library with more cataloged options and see how custom standard content can improve the efficiency of your assembly processes.

Friends Don’t Let Friends Use Old CAD!

Know a colleague who could benefit from our cloud-native, fully-featured collaborative design platform?

Latest Content