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.
Conditional Suppression
I am making a wall mount for USB Power adapters. I want to make it parametric from 1-6 plugs. Here is an example of 2:
I have the mounting ear, the plug, and the connector as separate objects and I can do most of the linear pattern and mirror to make it work for 2-6:
Where I get stuck is with 1. The Linear pattern for the connector bit looks like this:
That causes a problem, because instead of deleting the connector (which would be the right choice, since zero times the connector is zero), it errors and leaves in the one connector, which interferes with the right ear.
I have to suppress the connection extrude and the connection linear pattern if I choose 1 for #plug_count. I put both these operations inside a folder, hoping I could write some kind of conditional to determine if they are suppressed or not. But I don't see that option anywhere.
The other quirky thing is that at the end, I want to union all of them together. I have done that with #plug_count = 6. At that point, when I choose fewer plugs, it works with a warning. But if I could just tell it to union every part (select all or something), then I could support 1-inf number of plugs. Not a huge deal, since I doubt anyone wants to print more than 6. But I have hit this issue before with other designs.
Is there any hope? Is this a feature request? Am I using the Part Studio wrong?
Thanks in advance
Comments
Use Configurations.
https://cad.onshape.com/help/Content/configurations.htm