SOLIDWORKS IF Statement

How to convert a SOLIDWORKS Sheet Metal Thickness to a Gauge Value

A common practice in industry when working with SOLIDWORKS sheet metal is to show thickness as gauge value. For example, 20 gauge equals 0.0359 in. We will accomplish this using an equation, and IF statements to convert the values. Here is an example. This condition indicates that if the value is 0.0359, it is desired to display “20” as a result. Gauge_Number = IIF(“Thickness” LIKE 0.0359, 20, IIF(“Thickness” LIKE 0.0598, 16, IIF(“Thickness” LIKE 0.1345, 10, 1000))) Add extra IIF statements to the equation to show the desired gauge value. Create a custom property to use in your layout.

Read More...

Suppress features or components with nested SOLIDWORKS IF statements

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. 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” ) )

Read More...

The Syntax of a SOLIDWORKS “IF” Statement in an Equation

SOLIDWORKS If Statement

Hypothetical scenario: you have a design for a container wherein you have a length, width, and height. The length and width can be anything, but the height is driven indirectly by the length. If the length is greater than a certain value, then the height increases to a different value. An IF statement would be great for this – except that I’m not using C++, I’m using SOLIDWORKS. No worries, we can still use that, but more on that in a minute. Since it’s difficult to describe in the abstract, I’ll assign some numbers. My container is 4″ x 6″, and it’s 2″ tall. If the length drops below 2″, I want the height to drop to 1″ (otherwise, it might be top-heavy and tip over like my Christmas tree). So, if the Length > 2, then I want the height to be = 2, otherwise make the length =…

Read More...

Want to become a SOLIDWORKS Expert?

Take a LIVE Online Training Course from Javelin