Suppress features or components with nested SOLIDWORKS IF statements

Article by Jamie Hill, CSWE updated May 18, 2018


I recently had a customer ask me if it was possible to automatically suppress features or components based on an overall length. This stood out to me as a perfect scenario to utilize the power of equations, and more specifically nested IF statements.

In this example: I am patterning a section that is driven from an overall length. The problem is if I only need 1 instance (seed) of the section piece, the pattern feature fails because there is nothing to pattern.

Patterned Example

Patterned Example

In this case I’ve used a IF statement to suppress the pattern feature if the overall length is below 119″ (lower limit), or above 357″ (upper limit), and any length that falls between the limits will have the pattern feature unsuppressed.

“LPattern1” = IIF ( “length@Sketch1” < = 119 , “suppressed” , IIF ( “length@Sketch1” > 357 , “suppressed” , “unsuppressed” ) )

Suppress features

Suppressed Linear Pattern Feature

Equation IF statement added

Related Links

Certified SOLIDWORKS Services available from Javelin

Javelin can help you to:

Find Related Content by TAG:

Jamie Hill, CSWE

Jamie is a Certified SOLIDWORKS Expert working in the Javelin Oakville, Ontario, Canada office.