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.
Dynamic Suppression of features based expression if a certain Configuration is active
Erci_Cheung
Member Posts: 13 ✭
I like to suppress feature based on the configuration, is there a way to do this in the dynamic suppression expression to check which configuration is active or some other way. I can make a variable and set it but this would be simpler.
0
Answers
Yes, and there are more ways to do this but here is a starting point for you:
https://cad.onshape.com/documents/a3700d230eeefbe266f4830b/w/b0ecc9fe904f82db35bd955f/e/67bd2110e7791….
And here is a guide for How to use logical operators 📌
Note: you can control selections and queries with this kind of logic too, but query variable doesn't support it yet so you will have to use something like Query Finder feature to easily turn them into variables that you can modify.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
There are cases when what Michael is suggesting is necessary, but for most common cases, you can just configure suppression with the relevant config input and then convert one or more of the cells to an expression by right-clicking in the configuration table.
oops, i read too far into it 😁
thought you were wanting to control those features via multiple configurations rather than one configuration.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
This still requires a variable to be created. I was hoping for a way to do it without a variable by directly accessing the configuration name at the dynamic configuration expression maybe something like: ([config]=="Default?True:False)
Don't suppose there's a way to skip creating the variable and directly access the configuration ID? toString([current_configuration])=="Default"