featurescript
Discussion List
-
Constructing a Part in a Part Studio using DXFs
Hello All, I am trying to build a configurator inside featurescript that will build an aluminium door (from our product line). Some parts, such as the top bars and skins of the door can be created from standard geometry such as the cuboid command, and a host of other commands such as extrude etc. However, other parts are…
-
Centred Text in FeatureScript
I'm trying to create a simple featurescript thing that will take a numeric value (from a variable, but that's incidental), convert it to a string with a prefix and write it as text centred on the origin of a face of a body. Most of that is quite straightforward, but I've been completely beaten by the (seemingly simple)…
-
Set custom feature description in search bar
Is there any way to set this text in the search bar for a custom feature?
-
how can i take the thickness value from the sheet metal
I've made a copy of "CalculateBounds.fs script" and I've got a script that sets the length and width, but I can't figure out how to get the thickness out of the sheet metal. I added function calculateFlatSMBounds to the end of the following code which sets the description field to sheet metal dimensions. function…
-
Setting categories via Featurescript
Hi folks, does anyone know why setting categories via Featurescript is not (yet?) supported?
-
Custom feature script for 2 extrudes
I would like to make a feature script that will make 2 extrudes. I do this exact same action very often and I would like to make this automated. Regarding FeatureScript I am still relatively new (I have made a few featurescipts for variable lists), so I wanted to ask what I would need to do to make these actions happen.…
-
Is there a way to control dependencies in the 'configure properties' table?
I'm wondering if anyone can tell me how to use FS to control dependencies in the configurations property table(if possible). For instance, I have a hose I want to vary in both diameter and length. For any length of hose with D=1", I would want the part number to be 1. For any length of hose with D=2", I would want the part…
-
Wordle in Onshape!
So I'm sure a lot of you have seen all of these fancy posts on your socials: Wordle 229 3/6 🟩⬛🟩⬛⬛🟩⬛🟩⬛⬛🟩🟩🟩🟩🟩 and wanted to try the hit game, but you love Onshape too much to leave the site. No worries, because with the power of FeatureScript and configurations, it's possible to play Wordle in Onshape. Introducing…
-
Get Edge/Curve Parameters?
Unless I'm missing something, it seems it's currently not possible with FeatureScript to extract the control points, knots, weights, etc. of an existing edge or curve. It really seems like a fundamental problem. Is this on the roadmap? I do see opSplineThroughEdges in the documentation, but it sounds like it's…
-
Pros & cons of displaying the update-available icon (blue dot) on FS tabs
When a feature/reference update is available in a Part Studio, a blue dot icon is displayed on the studio tab, as well as directly in the feature list. This makes it easy to see, at a glance, which tabs in a document might require updates. In Feature Studios, the dot is displayed next to "import" statements, but not on the…
-
Get All Attributes
Is anyone aware of a way to get all named attributes of a part? In the legacy system we used to be able to just make the attributePattern filter an empty map and it would return all map attributes, but it looks like using an empty string in the name field of getAttribute/getAttributes does not return anything.
-
opFillet Variable Fillet Documentation?
It seems like with the recent update to add variable fillet with points on edges, the documentation for opFillet hasn't been updated. Peeking at the code, it looks like there are a few new parameters: "pointOnEdgeSettings", "edgeParameter", "pointOnEdgeRadius", "pointOnEdgeVariableRho", and "pointOnEdgeVariableMagnitude".…
-
Allow Non-destructive Ace Commands in View Only FeatureScripts
Right now if I want to search for something in std.fs I have to make a copy of it. If I hit CMD-F in a view only FeatureScript, I get the browser text search which only works for what's on screen - which is not helpful for long bits of code. If I'm in an editable version of a FeatureScript, CMD-F uses the Ace search and…
-
Using a closed loop sketch as path for opSweep
Hi, I'm trying to use a sketch inside FS as a path for the opSweep function. It works fine when the sketch contains a few connected lines, but it throws an error as soon as it becomes a closed-loop (e.g. a rectangular path). Any idea how it can be resolved? var path1 = newSketch(context, id + "path1", { "sketchPlane" :…
-
Obsolete FeatureScripts? Guides?
It seems like there really needs to be a better way to curate the most current useful FeatureScripts. As more and more functionality gets added to the native features in Onshape, there are FeatureScripts out there that don't make so much sense. There are also sometimes multiple people doing similar but different…
-
FeatureScript Help
I am trying to learn a little FeatureScript. Looking for a bit of input on this one, https://cad.onshape.com/documents/975e5a12e82b5d60281883ab/w/4c6a9174b7dd3839ec4c2295/e/a920a3afff5e167ad546da55 I copied the Port Feature by @cody_armstrongand modified it to do what I needed now I would like to get the tool to add the…
-
Mobile FeatureScript Challenge!
Mobile FeatureScript Challenge! Have you ever been in line at a coffee shop, and a strong urge to featurscript suddenly hits you? It turns out, you can actually write featurescripts on mobile devices! Objective: Write a FeatureScript only using your cellphone. Guidelines: - Only use your phone - You may import functions if…
-
Is it possible to use the "show dimensions" tool for a featureScript created sketch?
I'm having an issue where the dimensions are unavailable for a sketch that was generated through featureScript. Selecting the option does nothing and Im assuming that it is related to the fact that it was created via a featurescript. I have 3 speculations as to why this doesnt work: * This arc was created as an arc using 3…
-
Is there a way to change values of variables depending on an Enum selection?
I am relatively new to custom FeatureScripts and I am trying to create a list of variables. I would like the value of those variables to change depending on what choice I have made in the dropdown menu. I want the choices inside the blue bracket to change the value of those inside of the grey bracket.
-
STD vs Custom FeatureScript Speed?
In the process of investigating Bridging Curves, I noticed that copying a feature from the STD library and making minor modifications made it ~3x slower. I just did a test where I have my code (which has a few simple math changes), and the STD code where the only change is to add debug lines during edit, and then the…
-
Diff for Featurescript?
A while back I copied the Featurescript code for Bridging Curve and made some changes. I'd like to compare my version to the current version of the standard library code. For what it's worth, when I did this work originally Featurescript was at version 1324.0, it's now at 1618.0. I'm sure I can just download my code and…
-
Updated: Laser Joint Feature is now about 25% faster
Finally had some time to write more code, so made I some improvements in the Laser Joint feature! Can be found here, or by searching in "community spotlight" in the add custom features dialog. Using primitives and patterns to cut the pins in the tab parts now, which is about 25% faster than the previous version. No bugs…
-
Can Custom Feature Scripts Create Variables Automatically?
Would there be a way for me to create a feature script in which it will make a variable automatically with the only input from a person being the value. For ex. I'm trying to create a feature script to make bolt hole patterns that require an equation that uses multiple variables. I need to create variables that you can…
-
New FeatureScript: Cosmetic Threads
Hello Everyone, I'm releasing my first FeatureScript! Now you can create Cosmetic Threads in Part Studios: These threads are two helix edges which were created with sweep and split commands. Features: * Specify the pitch and the direction of the thread! * Shows in Part-Studios, Assembly and Drawing Tab! * Much faster than…
-
New feature to share: Composite selected
I created a new feature that allows selection of bodies by type for creating composites. I needed this because we have variable numbers of parts in our part studios and thus the manual selection option that comes with the built in composite tool doesn't work. On reflection, a better solution might be if the part studio…