If/Then Statements

I want use IF/Then Statements in design tables to createvarious parts.

Simple Example:

If Diameter = .750
Then d1 = .875
Else
If Diameter = .625
Then d1 = .750
Else
Endif

Where and how do I accomplish this?

Thanks for your time.

C. Madsen

SolidworksConfigurations design Tables
Comments 9
JH
JH 2009-02-06
I haven't used it in design tables, but I have in BOMs. Checkout equations in tables and BOMs under the Help menu search.
SF
SF 2009-02-06
My guess would be using an Excel based formula

so saying that A1 = dia



IF(A1=".750",.875,IF(A1=".625",.750,0))

explanation:

If Cell A1 is equal to .750, return .875, IF Cell A1 is equal to.625, return .750 , if both are false return 0

Tho, I don't use design tables, so it all depends on if the SWdesign table supports nested if statements..
JB
JB 2009-02-06
What's the question here?

Put d1 and Diameter in your design table.

In the column for d1, put an IF function dependent on the columnfor Diameter.
AM
AM 2009-02-23

Josh Brady wrote:

 

In the column for d1, put an IF function dependent on the columnfor Diameter.

When you create a new configuration, Excel inserts a newline, so that IF function won't apply to the new config until youfill it in. Is there a way to apply equations to new configs?

Adam
JB
JB 2009-02-23
Not automatically. You'll have to edit the design table andcopy/paste/fill your formulas for new configs. Alternately, createthe config from the design table.
KL
KL 2009-02-23
The whole idea of the DT is to control the creation andediting of configurations.
SF
SF 2009-02-24

Thank you Kelvin,

I do not see how or why one would want to create multipleconfigurations for parts and/or assemblies without a design table.Manual management has to be a nightmare, especially for those whodid not create the data in the first place.
SF
SF 2009-02-25
You can use if statements in Solidworks equations. If youdon't have a design table or configurations, you may want to trythis. You have to enter "IIF" instead of "IF" in the equation. Ifyou have a design table however, it may be easier to put it in theexcel file as part of your configurations. I have had trouble withsome equations updating automatically but haven't figured out whyyet. Too many little quirks with Solidworks!
SF
SF 2009-02-25
If your equations are in the Design Table then they never getupdated automatically. Design Tables are not part of the rebuildprocess.