-
Using the custompropertyID to show custom property in a custom table
Can someone show me the correct syntax to use the customPropertyID with PropertyType.CUSTOM? I just can't get it to work for some reason (mostly because I have almost no idea what I'm doing with FS!), but trying hard to learn..... var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM,…
-
Help needed: opMove doesn't behave as I expect
Hi all, I am experiencing an issue with the `opMoveFace`. The issue is relatively simple. I create a sketch (e.g. a circle) on a plane (let's say the `top` plane). Then, in a feature script, I apply the following operation on the created face (hereafter named `myFace`): opMoveFace(context, id + "moveFace1", {
"moveFaces" :…
-
Set a part name off Based off a Part Studio Name (Using Featurescript)
Is it possible to do one of the following 1. Get the current name of a part studio and name a part using that name 2. Name a part studio based on a part name I am trying to quickly rename and update properties for a lot of parts. I understand how to update properties and rename individual parts (using feature scripts) but…
-
Making queries and choosing parts
Hello, it's the third day I'm trying to figure it out but can't find a way. There are 2 "HOW TO" in the linked code I need help with: https://cad.onshape.com/documents/ea8f7cb66c45333ca1b9ef34/w/9adca070203387c455da1627/e/4b4132af1e1d18d47336a16e Can you help me with the two tasks: 1. The main thing to input is a mate…
-
Link Tab Broken ?
I'm having this issue when trying to sign into my google account to use the link tab tool where the authentication prompts this : Sign in with Google temporarily disabled for this app This app has not been verified yet by Google in order to use Google Sign In.
-
Instantiate and Query Preservation?
I am attempting to store queries(of edges) in a FeatureScript attribute of parts, and then derive those parts into another context. It seems to not preserve the query when using the instantiate function and I'm guessing that's because opMergeContexts() doesn't go into FeatureScript attributes. Is there a way I can go and…
-
Feature UI: 2 booleans on a row?
I have this: But I want this: DISPLAY_SHORT isn't doing it. Is this possible?
-
Need help on using Recursion(function calls itself)
Hi, Anybody used recursion function in FS. I am getting id issues while calling the function itself. Any help would be great. Thanks.
-
featurescript for beams
first off all,hello could some one help me under stand, and then show me how to install the beam feature script into my work document, I've copied Neil's beam generator and can create the beam code but cannot seem to bring the new beam into my work document hope you can under stand my question thanks barry
-
Attaching Documentation to Custom Feature
Hi, Is there anyway we can attach additional information(Like User guide in pdf format) to the custom feature?
-
Is it possible to make a LengthBoundSpec dependent on an input variable?
I'm searching for way to adjust the min/max input values in a FeatureScript, depending on previously selected inputs. Is that possible?
-
Center of Gravity Calculated with Featurescript
Hi Guys, I am trying to calculate the Center of Gravity (COG) of a 2D man (Picture). I worked with Solidworks Api and could figure everything out with the Macro Recorder. Sadly this feautre doesnt exist in Onshape and there are not a lot of Tutorials for Onshape. What i want to do in Feature Script is to calculate for all…
-
Is it possible to access a user-selected configuration parameter in a featureScript?
Hi everyone, I'm writing a featureScript that deletes selected entities, if a selected configuration parameter has a specific value. How is it possible to access a user-selected configuration parameter in a featureScript? Thanks for your help, Timo
-
Is it possible to enable selection while importing part using featurescript code?
I am importing a solid part. And I want to apply some transformations on importing solid part so that I can align it to Y-Axis. If I can select the desired cylinder face of importing solid part, then I can easily align it to Y-Axis.
-
How to query "self-referencing" entities that are generated in the feature
Hi there, This is a bit of a weird one. I want to be able to have the user give an initial set of inputs, have a script that uses those to generate some sketches and bodies, and then (still in the UI screen) for the user to be able to fill out a Feature Parameter Query with one of the entities created from the feature. In…
-
What's wrong with this opTransform input?
I can't figure out the specific problem that @opTransform: INVALID_INPUT refers to. I have checked the input, and don't see anything wrong with it. Is there a problem with the query I am passing? It's just a bunch of faces from an annotation. I tried a few others, and I keep getting this error. I tried a few different…
-
[New] Extend/Trim Edges FS
With this custom feature you can select two edges and automatically extend or trim the surfaces so the edges intersect! https://cad.onshape.com/documents/cbe410e5c44c9abf4e218496/v/4a1925e806a6d04ca473a864/e/b56a4d83f2e98a1be655ccef Like my previous Fill Gaps feature, keep in mind that this may not always work on broken…
-
FeatureScript for modifying sheet metal bends
One of the things I do very frequently is sheet metal bend perforations - to do this in Onshape now I sketch directly on the sheet metal flat and remove material from the flat. However, this is a very tedious process as I need to manually add each cutout for each bend. What I'd like to know (as someone with no…
-
Updating Official Feature Scripts and Using the Updated Version
I'm working on a design for compound planetary gear boxes with the intention of 3D printing them: https://cad.onshape.com/documents/9ca554446455ea6f1adca427/v/115c4f54e64515268982634d/e/10697cc92f7ab71e3933066c I have developed a design using the offical Spur Gear feature script, but that script lacks backlash control,…