feature script
Discussion List
-
Custom Feature: Clone Curve to Points
Allows you to move or copy a 3D curve to a new location by defining the new endpoints. New curve retains the essential "Character" of the original curve but is stretched parallel to new Chord to reach target points. (Chord is a line between curve endpoints) User can also scale new curve normal to new Chord, and rotate new…
-
Next number in part number scheme feature script
How can I modify my featurescript for an O-ring part studio to automatically generate next part number for each new configuration, following the in-built onshape numbering scheme? Currently, I have to manually enter the desired configuration in the properties and create a version within the part studio. I have read that…
-
Get part studio name within featurescript
Can you get part studio name within featurscript? Why? I'm using a CAM that allows importing of solids with metadata via a CSV file. In said file the first column must have the File path of the .x_t solids that it will import. Since conveniently onshape can export parasolid files with the part studio name - part name (a…
-
Freewheel Mate possible via FS?
I've asked about a means to create a freewheel functionality using the built-in mates earlier. It wasn't thought to be possible. I didn't find any useful workaround either, and I am not a FS wizard. Now I seem to have another project coming that calls for a function where things can rotate, but only one way. What do the FS…
-
How to retrieve all the feature ids used to generate a part in a part studio
Hello, Is there any way to know what features and sketches (by ids or names) are used to generate a part, given the part Id using featurescript? For example, in the image, When I click on part 1, Extrude 1 is automatically highlighted, which means it's saved somewhere. Thank You.
-
How to have a Sketch as a parameter
I’m not sure I’m getting the terminology correctly, but when I’m saying parameter I’m referring to the light-blue input boxes that are in the feature-menu that pops up when creating a new feature. Say, in a Part Studio, I creat a new Extrude feature. I can either manually select entities to extrude (with my cursor), or I…
-
How Do I Reach Out to FeatureScript Dev?
I am attempting to bug report for FeatureScript's Point Pattern but am not sure how to reach out to any devs since I cannot find anything online or on featurescript docs. Any help would be appreciated!
-
opTransform error in FeatureScript
Hi, I am trying to do an opTransform of type copy, but I am getting an error I don't understand. It seems like the error is saying that TransformType.COPY is a String and should not be a String, but it doesn't look like a string to me. Could someone tell me what I am doing wrong here? Thanks, Jason This is my code:…
-
Control points and knots! A new custom feature...
I have finally published something - I've been messing around with this tool for ages, but finally here it is: https://cad.onshape.com/documents/d675d2ccbcf6336cf8ef52bb/v/8384e60ced2c089ec8e3d2a9/e/853bddb5d9a1fffded23ae80 For advanced curve and surface modeling it is usually critical to see exactly where the control…
-
Another feature script ID error...
@opPlane: Parent Id FIZxwPCJn00T9Nq_1.0 used at two non-contiguous points in operation history (Cannot have FIZxwPCJn00T9Nq_1.deleteBodies2.3 between FIZxwPCJn00T9Nq_1.0.SparPlanes and FIZxwPCJn00T9Nq_1.0.0) I don't know what is wrong with this clearly the ID'd are different because they are unique strings... the ID + i +…
-
multisort an array/custom table with featurescript
Hi, As I start always: I am not a programmer, but I think I want something fairly simple: I want a 'multisort' in an array or custom table. At the moment I postprocess the tabel in an php script and use: array_multisort(array_column($arrRondjesGrid, 'y'), SORT_ASC, array_column($arrRondjesGrid, 'x'), SORT_DESC,…
-
how to get the coordinates from all parts? loop through all parts en print the coordinates
Hi, I am not a programmer, but I think I want something fairly simple: I want a list of coordinates of all parts in the part studio. Basically loop through all parts and print the coordinates in the monitor (or save to csv, but that is luxury... : )…
-
How to make multiple instances of feature based on selecting multiple mate connectors.
If some could help me with this or give me a reference document with something similar that would be great. I am trying to make a shape appear wherever I select a mate connector using Feature Script.
-
How do I get the parallel distance between two mate connectors?
working on my first script. evdistance is giving me the total distance between two mate connectors, but I want the parallel distance between them (or normal to the first one) https://cad.onshape.com/documents/68cc6e7f44c7d45ead2a1b38/w/5c67626b11109a69231f9606/e/f5a54e138097299817bb6f7b
-
How to emboss a logo to a non planar object
Ok this is something there has got to be an easy workflow too but I spent about an hour researching feature scripts and could not find a good match. Say we have an injection molded part with an irregular surface and we want to lightly emboss a logo to it. The only way I was able to get this to work was to do a removal…
-
My first Feature Script: Hex Rod
Being an FRC mentor means we draw a lot of 1/2 hex rods. I wrote my first featurescript to let you place a hex rod between two mate connectors. https://cad.onshape.com/documents/68cc6e7f44c7d45ead2a1b38/w/5c67626b11109a69231f9606/e/f5a54e138097299817bb6f7b
-
Applying Properties to Composite Parts with FeatureScript
Hello! I have been testing some of the available feature scripts for changing part numbers and descriptions on some of our parts. None of the custom features seem to work because the parts are composite parts. Is there a trick to using featurescript to change properties on composite parts?
-
Get ride of duplicate lines
Hello I have a dxf with a tiling made of geometric primitives like triangles and squares. The sides of the adjacent 2d shapes are on top of each other, so I have a few lines in the same coordinates instead of one line. To make it ready for the cutting machine I need to get rid of duplicating lines. Do you know if there is…
-
Set a custom property via Featuresript for another custom property
I am currently trying to write a bit of featurescript that will query a manual entry custom property within a part and write it to another custom property in a drawing. The part custom property has an ID that I can access, but I am really struggling to get the syntax right. Can anyone point me at an example of this?
-
FS working in file with featurestudio but not when added to tool bar?
Hi All, I am wondering if anyone has experience trouble shooting this: I have a sprocket feature script that functions perfectly in the main file, but fails on a specific user input combination once I have added it to my tool bar in a different document. In the screen shot below the lefthand view is a close up of my…
-
How to read in specific variables from a CSV based on user inputs
Howdy Folks, I am trying to scan the first two columns of rows in a CSV using two numeric user inputs as the search key and find a match. Then, return the remaining two column values as variables required for creating a hub on a sprocket. Every simplification/variation of the code that I have tried returns the same…
-
Putting a part number automatically into a text feature
Hi all, We are trying to find a way to automatically put a part number in a text feature. We have found feature scripts where you can configure the text, but we want onshape to grab the part number from the part properties instead of manually changing it in the configured properties. Our final goal is to have every plate…
-
How can I see if a Boolean subtract has modified an object?
I am passing a pipe with some fittings through a concrete wall and I need to know which of the pipes and fittings are going to be embedded in the concrete. One approach is to use the Boolean subtract with each pipe/fitting one at a time. Then I need a method to see if the concrete wall has been modified after each Boolean…
-
Linear Mass Custom Property via FeatureScript
I have successfully created a few lines of FeatureScript to take the volume of a 100mm long extrusion and output the volume per metre (including changing the units) using evVolume. I want to do the same thing with mass per metre, but it appears evApproximateMassProperties requires a hard-called density, even though the…
-
Feature script for spiral bevel gears
Hi, Is there a feature tool for Spiral bevel gears?
-
TableData Reading First Element as String
I'm writing a feature to read in a CSV of airfoil data points and plot them on a plane. When reading my CSV the import appears to be formatting the first element of the file as a sting. I have looked at the file, it's not formatted that way in excel or .txt editors. It seems to be local to this. Generically my code is:…
-
sheetMetalTab operation
I am trying to add a sheetMetalTab to a custom feature but
-
Debugging a feature script
Hi all, I start to use feature script, great stuff indeed. As there are not too many tutorials and a basic doc I still make a lot of errors and many operations I have to learn by try and error. Now when something is wrong I see in the part studio the message "Feature did not regenerate properly " plus a short error message…
-
Switch from Beam feature to Frame feature and preserve body ID's?
Long ago, I used the Beam feature to configure an 8020 extrusion. I can configure the profile, the length, and the machining on the ends. I have mate connectors whos positions change to stay in the expected mating locations when the configuration changes. The part number and description is configured to indicate the…