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.
Suppress a feature if config variable is equal to 1..
APD
Member Posts: 40 PRO
Hi,
I've set up a configured part studio for a Generic Furniture Unit. Shelf spacing and number are controlled with my #ShelfQty config variable.
If my #ShelfQty is equal to 1, I'd like to suppress my Array feature (which fails with just 1 shelf in this set-up)
https://cad.onshape.com/documents/17a0cbeb16f67cb4426f970b/w/2b1760473795123af0eb627c/e/d9edaaa09c39d4fd9699c56b?configuration=Depth=0.59+meter;Height=0.8+meter;ShelfQty=1.0;Single_Shelf=false;VFC_Thickness=0.018000000000000002+meter;Width=0.59+meter
Grateful for any tips.
I've set up a configured part studio for a Generic Furniture Unit. Shelf spacing and number are controlled with my #ShelfQty config variable.
If my #ShelfQty is equal to 1, I'd like to suppress my Array feature (which fails with just 1 shelf in this set-up)
https://cad.onshape.com/documents/17a0cbeb16f67cb4426f970b/w/2b1760473795123af0eb627c/e/d9edaaa09c39d4fd9699c56b?configuration=Depth=0.59+meter;Height=0.8+meter;ShelfQty=1.0;Single_Shelf=false;VFC_Thickness=0.018000000000000002+meter;Width=0.59+meter
Grateful for any tips.
Tagged:
1
Answers
HWM-Water Ltd
I'll not worry so much about the failed featured for now, as what I have is working. Pity the Linear Array tool prohibits a single instance, (i.e. 0 child parts generated).
To test the part studio I generated the max of 10 shelves, renaming them (Shelf1, Shelf2 ... Shelf10).
Then reduced the number to 2, (wiping out 8 shelves ).
Finally I set the control back to 10 again.
When they all regenerated I was pleasantly surprised that Onshape remembered their names!
Hopefully all other part meta-data would be remembered too? I will test that at some point.
Neil, one day I might have a go at feature script, (I would really love to learn) but for now I'll keep it simple.
Thanks Again.
Works like a charm if you want to use it.
https://cad.onshape.com/documents/87a9311e82efb0e400844954/w/2ac11d504ee56cc35486f483/e/3ad2935735a046e7b8680829
Thanks!
Not being able to supress a feature based on a logic expression is something that often causes problems for me. For example, I need to supress several features if a configuration parameter is an even number, or if its less than a given number. These must be relatively common problems for configuration users
Now that Boolean tick boxes can be converted to an expression (which was a great recent improvement, thankyou), why not have an "convert suppression to an expression" option? currently I am cloning native features, adding a suppression Boolean, converting to an expression, and then putting the logic in there, but its crowding my tool bar to have all these feature scripts that are basically just copies of the native tools.
Or put an on/off Boolean in every native feature !? (this would also allow users to potentially supress a feature in TWO configuration parameter tables, which I know can lead to configuration conflicts and could be seen as bad practice... but with careful use it can also be very powerful)
Thanks for your time.