-
Can Featurescript pull data from Google Docs?
I used to have a VB program in Solidworks that would popup a dialog window. In that window I would use a dropdown box to pick the Project name, and a commodity type and then the program would create a prefix and then pull a sequential number from an Access database to create the part number. Is it possible to go something…
-
Shortcut for copying all
What is the shortcut key to copy all in feature studio? Where can I find the list of all shortcut keys?
-
how to check if a string includes a substring?
how to check if a string includes a substring?
-
RealBoundSpec Question
-
coordsystem question
-
Guide curve or more profiles for lofting.
I am lofting a changing profile P(t) where t is a parameter tmin < t < tmax. I can generate the profile at any t so any number of intermediate profiles are possible. I could also generate the guide curves for the profiles. However is there any benefit to using guide curves if I can just generate more intermediate profiles…
-
SELECTING FROM THE FEATURE TREE
Is it possible to select a derived feature in the feature tree without user selecting it?
-
How to find all intersections points of an edge chain with a plane
For example I have the loop of a face by var loop = qLoopEdges(def.face); and I have a plane p var p = plane(....); and I would like to find all the intersection points of this loop with the plane. Is there an inbuilt function to do this? More precisley if I have selected the sketch face in grey I would like to find the…
-
EXPORTING VALUE
How can I export this value?
-
How do I select an adjoining part in FS
I have a part studio with multiple parts, I want to be able to select 2 faces on one part and then also work on the part that adjoins it as below: The mock up is available at https://cad.onshape.com/documents/1d8686fa8d2943b37843e397/w/4b929d003a5a139e2f77286e/e/e0979796b001bdae18a9981c I can easily get all parts by using:…
-
Is there an interactive query explorer?
It would be useful to help my understanding of the various qXXXX() query functions to be able to use the UI to explore what they did. I envision a FS with a dropdown menu of most of the query functions (qLoopEdges, qVertexAdjacent, qConvexConnectedFaces etc. etc.) and some input fields. I could then select a function from…
-
CAPTURING USER INPUT
how can i capture user input from the ui and make it as attribute?
-
How do I correct holes that are on the wrong axis?
Thanks to some previous help here, I have managed to cut some holes using the hole tool but depending on the orientation of the part the holes end up incorrectly positioned. Not actually an issue currently as I will always work in one plane but I would love to make the feature universal for future proofing. Correct holes:…
-
SKETCH PLANE
can i query what coordsystem is the sketch created?
-
Are sketch operations like "offset" or "split" available in featurescript?
Are sketch operations like "offset" or "split" available in featurescript?
-
In Precondition, how do I set a default value for a Boolean?
I can set a default a default for an integer or float with something like: isInteger(definition.numberOfHoles, { (unitless) : [1, 10, 1000] } as IntegerBoundSpec); How do I set the default for a Boolean? Is there a "BooleanBoundSpec"?
-
Questions about units
I've more or less finished my first real feature script. Thanks for all the help! I had excellent help from the forum. I have questions about values with units. I think everything in the database has meters as the length unit. Other units are assigned as conversions from meters. When I print values via "debug()", the…
-
How do you bring numbers in as a precondition
I want to bring a simple unitless number in as a multiplier. I also want to restrict the range and assign a default value. annotation { "Name" : "Scale" } isLength(definition.scale, { (inch) : [1, 1.059463, 1.07463] } as LengthBoundSpec); this works, but I think I want this: annotation { "Name" : "Scale" }…
-
Queries, queries and more queries ...
Here is a simple FS: FeatureScript 736;
import(path : "onshape/std/geometry.fs", version : "736.0"); annotation { "Feature Type Name" : "FS Test" }
export const fstest = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "Plane", "Filter" : GeometryType.PLANE ||…
-
How do I get the length and vertex values of a simple edge
Is there a simple example of how to query an edge for length and vertices? I've looked through several .fs examples and I get lost on what is relevant to my question. In particular the concept of context. If I pass in the edge in precondition, what should the context be when I query that edge?
-
Can points be added to an existing sketch with feature script?
I want to add functionally derived points to a sketch to use as anchors. Can I do this with feature script? In a way I'm asking to create a custom constraint.
-
I'm having trouble with skPolyline --- ALREADY ANSWERED...
I am having trouble with this code: var fPoints is array = []; var L = 10.0; var CL = L; var Rule = 1.0 ; for (var i = 0; i < definition.numberOfF; i += 1) { fPoints = append(fPoints,vector(0,CL*inch)); CL = CL/Rule; } skPolyline(sketch1, "polyline1", { "points" : fPoints }); I'm getting "Precondition of skPolyline failed…
-
Featurescript Custom Icons
Is there any way to set an icon for a custom feature that I have created? This would be extremely useful in distinguishing my custom features
-
opBoolean FS Question
Can I do opBoolean without user selecting the "targets"?
-
opExtractSurface on Derived feature - NOT touching the one sided edges
-
opExtractSurface using derived feature
-
@opBoolean: BOOLEAN_SAME_INPUT error message
I am trying to create 2 holes in the same body using an adaption of the featurescript from "Dowel and Minifix", I can create and subtract the first hole and create the cylinder for the second hole but when I try to subtract that I get the error "@opBoolean: BOOLEAN_SAME_INPUT". My code is as follows: <div> // Create Hole…
-
Selecting Derived Sketch
can somebody explain me , how to achieved this. I have sample code that I can use but I want to know the basic.