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.
Best Of
Re: Can you use "conditionals" with variables?
Yes and yes. The syntax for your conditional expression is:
Finally, if you need fancier logic, you can get and set variables in a custom feature.
#x > 10 ? 0.5 * #x : #x<br>Another possibility (without using a custom feature) is something like:
{ 202 : 0.248 in, 204 : 0.491 in, 305 : 0.612 in}[#keyNumber]<br>which if #keyNumberis 202 will evaluate to 0.248 in, etc (what this expression does is define a map from key to length and then does a lookup in this map).Finally, if you need fancier logic, you can get and set variables in a custom feature.
Draw (New Custom Feature!)
Draw (New Custom Feature)
https://cad.onshape.com/documents/bad94104a5ecdd5d422a7b40/w/ce1f9d49a79762d0e2431752/e/4fea5d9770def4e66ed79f03Happy feature Friday!
With this custom feature, you can create a spline (or polyline) and sweep by dragging the manipulator triad.
If you like this feature, check out Freeform Spline by @Evan_Reese.
Thanks @ilya_baran for the manipulator advice.


