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.
variables
Discussion List
-
How to getAllVariables() in defineFeature.precondition?
In a defineFeature, I would like to list all variables in the precondition. Here is my code: FeatureScript 2559; import(path : "onshape/std/common.fs", version : "2559.0"); annotation { "Feature Type Name" : "Set Variable", "Feature Type Description" : "" } export const myFeature = defineFeature(function(context is…
-
Is it possible to set a minimum & maximum value for a sketch dimension ?
Using variables or otherwise, is it possible to set a minimum & maximum value for a sketch dimension ? Giving different values to some variables affecting the mentioned dimension, I want to be able to choose the value of that dimension and make sure that the result will stay between some defined limits. The link:…
-
Variable Hole Count With Calculated Spacing
I wasn't able to find a good answer searching the forum, so hopefully this hasn't been a repeated question. I'm creating a configurable enclosure that is assembled with fasteners. I have two requirements for the fastener holes: 1) the end holes must be a consistent distance from the back and front of the box and 2) the…
-
How to strip the units from a length?
Hi All, Is there a way to strip a length of it's units so the decimal number can be used in a "ceil(#/#)" equation? I am trying to use configs to create an expanded metal/grating generation part studio and have it working well except for getting the desired sheet size to auto size. I am using measure distance FS to get the…
-
"move/ promote variables"
Quick Question: Is it possible to quickly move/ promote a variable form a part studio variable to a variable studio (eg when later becomes apparent it's also needed elsewhere, for instance in an assembly which uses the part?) or is the only way to do so by manually redefining it in a variable studio, and attaching the…
-
set properties to a variable (text)
I know this can be done with part studio or part properties (featurescript or computed part properties.) set property. But can it also be done with drawings or assemblies? looking for an easy way to have customer or project number show up in metadata of all parts, assemblies and drawings. any thoughts?
-
how to make a variable feature with multiple variables
Hi, I would like to have a feature script like the Variable, but then with multiple Variables for the input. The reason is that when you have a very complex document and the Variables in the beginning I takes quite some time to regenerate the drawing after submitting the values. You have to wait for that before adjusting a…
-
Same Variable Name!
Hi I just start learning Onshape from learning center and special thanks to this amazing team. I have a question about variables. In the last exercise we should put the same name for variables, Can someone explain me that reason? Cheers Alireza.