Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Best Of
[Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
Hey everyone,
I’m a mechanical engineer, and I’ve been working with FeatureScript at my company for about a year now. Honestly, it’s been tough. Tools like ChatGPT suck at FeatureScript, which is frustrating when you know how useful they are for more familiar languages like JavaScript or Python. Unless you're a FeatureScript expert, I think we can all agree that productivity takes a big hit compared to more common languages because there’s no good LLM-powered copilot to help out.
So, we fixed that ! We built our own AI assistant, specifically for FeatureScript !
It’s not perfect, but it’s way better than ChatGPT in this area. This isn’t just a basic GPT model with the Onshape Standard Library as input—two of our machine learning engineers spent six months building it. They used a technique based on a paper called “Large language model multi-agent collaborations”. I’m no, expert but basically, they created a system with reasoning steps, multiple agents working together to analyze questions, generate code, cross-check the documentation, test, and iterate until the output works. It uses RAG, agent-based reasoning, and multiple LLM calls to get the job done. Internally, it’s been a game-changer for how we work with FeatureScript. And while this tool clearly doesn't make us better than a featurescript expert, it does make us infinitely more productive.
Don’t get me wrong, if we had 10 million dollars to label tons of FeatureScript data and fine-tune a big model, that would be even better. But for now, this approach is giving us a really good productivity boost, and we’re pretty excited about it.
Now we’re wondering if we should share this with the outside world. There are a couple of big questions:
- Would people pay for it? Let’s be real: running all these models and doing this whole chain-of-thought process isn’t cheap. Plus, they put so much work into this. They’d have to charge a monthly fee. For professional work, it’s a no-brainer—just a small productivity boost pays for itself almost immediately. But do you feel the same way?
- Is there enough interest out there? Are we looking at a niche tool that only a handful of people would find useful, or is there a real market for something like this?
I’d love to hear what you think. Would a specialized FeatureScript assistant be worth the cost to you or your company? Are we barking up the wrong tree, or does this seem like something that could fill a real need?
Thanks for any thoughts you can share !
Re: FeatureScript Editing Logic: Array Indices Not Updating Properly
it's the parameter "isCreating is boolean"
Thanks to allI 🙏
leave code for newbies.
"Basic structure for array numbering"
import(path : "onshape/std/geometry.fs", version : "1511.0"); annotation { "Feature Type Name" : "Base Array Numbering", "Editing Logic Function" : "showLogic" } export const baseArrayNumbering = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "Select Items", "Item name" : "Item", "Item label template" : "Index: #arrayPointIndex" } definition.myVariables is array; for (var variable in definition.myVariables) { annotation { "Name" : "Array Point Index", "UIHint" : UIHint.ALWAYS_HIDDEN } isInteger(variable.arrayPointIndex, POSITIVE_COUNT_BOUNDS); } } { println("My element definition" ~ definition); }); export function showLogic(context is Context, id is Id, oldDefinition is map, definition is map,isCreating is boolean) returns map { println("Number of items counted in showLogic: " ~ size(definition.myVariables)); for (var i = 0; i < size(definition.myVariables); i += 1) { definition.myVariables[i].arrayPointIndex = i + 1; println("Inside function, currentIndex is: " ~ definition.myVariables[i].arrayPointIndex); } return definition; }

Re: FeatureScript Editing Logic: Array Indices Not Updating Properly
I suggest reading the documentation on editing logic. Some useful stuff in there.
if the "isCreating" parameter is omitted, then the editing logic function only runs during creation.
Re: How do I change what I have currently into this wheel ?
The learning center might be a good place to start.
You could sketch the profile of the cut and use revolve/ remove to spin it around your axis.
Re: [Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
It's definitely interesting, and feels like an inevitable thing that will exist. I think I share Simon's feelings though. If it really worked it would be valuable. Even more so if it could get Onshape users from non-FeatureScript users to FeatureScript users. That initial learning curve is steep (or was for me anyway). I also use Grasshopper from time to time, and agree that some kind of node-based FS builder could be huge for enabling people who are currently intimidated by FeatureScript. The two would complement one another, not compete.
Re: [Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
I'd love to see some YouTube demos before commenting too much.
That said, I would prefer that PTC/Onshape develop a first party solution to this problem. The problem isn't so much that we need an LLM powered assistant, it's that there are people who would like to build something like a feature that could be re-used, but is easier to do than fighting with queries and sketches in FeatureScript. Solving the FeatureScript usability issues with an LLM may be helpful, and I would certainly be willing to try it, but I'm not sure that's solving the right problem.
I feel like FeatureScript represents a huge, mostly untapped potential to change the way parametric mechanical CAD is done. Despite spending a fair amount of time going through tutorials and following the discussions on the Forum here, I find myself very frustrated by my progress or lack thereof. I haven't touched Grasshopper (parametric visual coding for Rhino) in a long time, but my memory of it was that it was so much easier to just get started and make something useful. I wish there was something that would perhaps live above FeatureScript which would be that simple to use, or put another way, I wish there were a way to to connect regular Onshape features into meta-features which could be re-used.

Re: Render Studio Galvanized Steel Sheet
For strongly glossy/reflective appearances like this, even though with very broad highlights, the lighting environment and background will strongly influence the look and feel of the appearance. If the environment doesn't contain much variation (and the default studio lighting is quite neutral), you'll definitely get a flatter look.
The "Stainless steel - Shiny smudged" likely provides a good starting point as noted by STEG above. You would need to increase the "Roughness" parameter of it to get closer to something galvanized. With that and some different lighting I get something like this.
If I go a bit further connect a "Flake noise pattern" function to the "Roughness" parameter to give a variation in roughness rather than being uniform I get this.
In that example I changed the "Scale" parameter of the flake texture to 0.001 and the "Density" to 2. I also used the rounded corners option in the stainless steel appearance just so the edges catch the highlights.
Re: Render Studio Galvanized Steel Sheet
With flat surfaces you really need to have some surface texture/anomalies/fingerprints and also think about lighting. The smudged steel usually works well - you could tone down the shniness a bit (below is the default)
Re: Is there a usage standard for CALLOUTS that have boundary geometry?
You are correct, Y14.100-2017 is the latest revision.
Cut & paste from 2013 revision of Section 4.26.6 (f) is identical to the 2004 revision. Still no description of flag symbol style significance.
Should I assume the statement, "The same flagnote symbol shall be throughout the drawing." means you pick a one symbol style and use it for ALL flagnotes. A mix of flagnote symbol styles cannot be appear within the same drawing. In my experience I have seen multiple flagnote styles used on the same drawing sheet.

Re: Is there a usage standard for CALLOUTS that have boundary geometry?
2017 is the latest version of ASME Y14.100. I have the 2013 version, and the flag note section doesn't say much.
