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.
featurescript
Discussion List
-
Export sketch as piecewise polyline.
It's been a while since I've written any featurescript. I'm looking for the following solution. I would like to be able to select N closed and open chains of sketch entities and with a provided tolerance tesselate them into N piecewise polylines and then either print them to the console or copy them to the clipboard. Is…
-
Custom Feature: Engrave
Link to Engrave I like to label all of the machined parts I possibly can with their part numbers and revisions so my coworkers can easily find them in CAD without knowing their location in a folder. Yesterday I released the Hershey Text function and this engraving feature is meant to pair with that in my almost finished…
-
Using a pressure parameter in feature UI, accessing Young's modulus from material properties
I'm working on a feature that will A: Create cross sections along a curve from a selection of bodies and B: to calculate the bending stiffness of each cross section, though this may beyond the scope of Featurescript. I am selecting bodies as part of an array parameter, and then extracting names and material properties in…
-
Custon Feature to concatenate custom property and part name
Can someone please guide me OR share materials to help me achieve the following: I have a custom property called BCP Part Number, I want to automatically transfer this number and concatenate it with the Part Name as per the below image. Such that the final part name is a combination of BCP Part Number + Part Name.
-
Featurescript Dev Paid Contract: BOM Auto-Kitting Featurescript
I don't know if this is the right place to post this, so feel free to take it down if it isn't! I'd like to hire someone to write a custom feature script that will automatically take an assembly and create a 3d-printable "tray" with bins labeled with each parts part number and revision, where the bins are large enough to…
-
How do we find useful feature scripts?
@Jake_Rosenfeld posted a very helpful article about adding FS at the end of this discussion Jake or others - I have seen this question on forum before but I do not remember a good answer. I know FS is not intended long-term solutions to generally required functions. However, for now there is a lot of good stuff which we…
-
qEdgeVertex suddenly missing – related to default libraryVersion?
Hi everyone, I'm running into a frustrating issue with FeatureScript inserted via the Onshape API (from a Python-based workflow). Recently, my script started failing with an error saying the qEdgeVertex function is undefined. After some investigation, I found that the root cause seems to be the libraryVersion — it's being…
-
New FeatureScript: Cosmetic Knurl
Hello everyone, I released my Cosmetic Knurl FeatureScript: https://cad.onshape.com/documents/0bad5bfa3637bf84138a2a24/w/3daa9f730d6802a81ead8a58/e/af28a7d9efffdd0020743e56 This should help if the 3D modeled knurls are taking to long to regenerate B) You can also type in a custom name and then the name is shown in the…
-
Is there any good way to sync FeatureScripts among several users?
I am part of FRC team 2704, and we are trying to use a few featurescripts from other teams, but getting them onto everybody's account is proving painful. We do have a classroom set up, if that helps or hurts us. The main issue we are coming across with just sharing links to the documents is that some have many…
-
Adding volume as a custom property?
Back in January, mass was finally added as automatically computed property. It seems like other properties can be added through FeatureScript. I want to add part volume as a custom property which can then be added to standard drawing notes. How do I do that? Is there a standard way to do this?
-
Detecting used mate connectors?
I am hoping to develop a feature that will scale a model without scaling its used mate connectors. This will allow me to preserve the size of a joint (e.g. a screw hole) while scaling the rest of the model. Is there a way to detect used mate connectors?
-
Point Pattern, set orientation for each?
I'm using @cody_armstrong 's Point Pattern FS quite a bit. Very nice!! Some of my patterns would benefit from being able to set the orientation of each thing patterned and I would like to add that functionality to a copy of "Point Pattern". Something simple and click-able like the "reorient" like when placing Mate…
-
What does this error message mean?
Posted previously today about a FeatureScript I am working on for some learning/practice. I made some progress after getting stuck on a small miss of coding, but now I have this error: The first mate connector stops working, and the second one is fine using the same format.
-
Second opTransform not working following same format as previous one
I am practicing some of my FeatureScript skills and understanding (sadly after having to take a break from FS) by creating a FeatureScript that makes three mate connectors in each of the three axis orientations for a selected mate connector location. I can't seem to figure out why this call line is not working when the…
-
How do I export a value to the part studio in FS?
Sorry about the previous post… tried to press enter to move to the body box and it sent instead… As the title states, I am having issues with exporting a variable back into the part studio from my function… I want to do my calculations in the script and be able to retrieve the result of the calculation… here is my feature……
-
How to Identify Faces Directly Created from Sketch Edges in an Extruded Part (FeatureScript)?
Hi everyone, I’m working with FeatureScript in Onshape and I have a question regarding extrusion operations. I’ve created a part by extruding a sketch, and now I need to identify which faces of the resulting solid are directly created from the edges of the sketch (i.e., the side faces that are the result of extruding the…
-
Connections array for opLoft not being applied
Hello! I have been working on creating a featurescript to loft together two identical spur gear profiles at a vertical and rotational (around Z) offset, creating a hyperboloidal profile. the gear profiles generate without issue, and there are no errors in the featurescript, in the code or generation, that are reported. The…
-
FeatureScript Video Walkthrough Series
Hello everyone, I've been wanting to make some FeatureScript training content as of late, so I decided to record a series of videos where I create a new FeatureScript from scratch while talking through my thought process and code as I go. The full Youtube Playlist is here:…
-
qAdjacent finding phantom edges in deform feature
Hey there, I'm working on a feature that will take a body (solid or sheet), a 'From Wire' and a 'To Wire' and deform the body from the From wire to the To wire. In many senses, this is similar to some other features I've seen published (Flex, I'm looking at you), but I haven't been able to get the behavior I'd like with…
-
How to name sketches created in featurescripts?
The following code does not work as intended. When running this feature script it will produce a sketch named "Sketch 1" in the feature tree. How can I change the name to "Name of my sketch"? var sketch1 = newSketch(context, id + "sketch1", { "sketchPlane" : qCreatedBy(makeId("Top"), EntityType.FACE) });…
-
External table content, creation, and modification
Apologies if this question has already been asked or answered in some form — I took a look around the forum and couldn't find anything that really fit my query. My ultimate goal is to add additional thread specifications to both the Hole and External Thread features. It seems reasonable to do this by creating a new table…