You are on page 1of 23

Automate your design with equations

Frank Ruepp, Product Manager, Definition Dassault Systmes SolidWorks Corp.

Who is the presenter and how to get the presentation

Presenter:
Frank Ruepp
Product Definition Team frank.ruepp@3ds.com

What we will learn today


Main Assembly

We will get a general overview about top-down design We will look at the basic equation functionality We will look at the advanced equation functionality in order to automate your design
Assigning a parameter to a dimension

Sub Assembly Sub Assembly Component 1 Component 2 Layout Comp.

Linking an external parameter file Conditional statements AND / OR operator INT function Suppressing / un-suppressing features

Working with a Layout Component

A layout component should carry all the basic geometry that is referenced by other components
Layout components usually should not appear in the BOM Layout components usually should not have a weight Layout components can contain
Reference geometry Sketches Perform general calculations (equations) Patterns
Tip: Delete the body but the pattern is still accepted as derived pattern reference

Working with a Layout Component


Included geometry
Sketches as (external) references Ref geometry to place components Feature patterns as the foundation of Feature Driven assembly patterns
Tip: Curve driven pattern

Exclude from BOM option for components Tip: Delete body so that it does not influence the assembly weight Hide the component Benefits:
Common placement of components Concurrent engineering Only one external reference
Trailer_layout

Basic equation functionality


How to access the equations functionality:
Tools -> Equations Double-click on dimension and start to type your equation RMB on the equations folder (as long as there is already an equation existing)

Lets have a look at the equation manager


Equation manager layout
Different tabs for different tasks
Equation tab listing all global variables and equations Dimension tab listing all parameters used in the component Ordered view list the equations in the order they are solved

Filter, undo and redo Automatic rebuild, angular units and automatic solve order Link to external file

Create an equation
Creating an equation:
Tip: Check that Instant3D is turned off Double-click a dimension (300mm) Type an equal sign that starts the equation input Notice that we expand a dropdown list with additional options Pick a different dimension (150 mm) Complete your equation by adding the mathematical operation (* 2) Green OK arrows in order to accept this equation
Trailer_layout -> width sketch -> 300 width = 150 height * 2

Can I have a pattern with 8.35 instances?


No, you cannot. Pattern instances are rounded SolidWorks automatically rounds to the next whole number
Instance(2) = 100 / 50 -> 2 Instance(2) = 124 / 50 -> 2.48 Instance(3) = 126 / 50 -> 2.52

Or you can use the INT function to get the integer of a division
Instance(2) = INT(124 / 50) -> 2.48 Instance(2) = INT(126 / 50) -> 2.52

Example from the trailer_layout


"D1@tankrestpattern" = int(("TrailerLength" 1300) / 1000)

Trailer_layout -> INT

Import parameter file


Link an external parameter file to a component
Equation editor has the option to: Import an external parameter file (trailer_spec.txt) Option to Link to file

This imports the parameters and equations defined in the trailer_specs.txt file
Link to file updates the component when a parameter changes Linked parameters cannot be edited
Trailer_tank_vessel -> trailer_specs.txt

Export parameter file Unlink an external parameter file


Existing parameters and equations can be exported as well

Unlink an external parameter file by importing without the link to file option
File reference will be deleted Linked symbol disappear Parameters can be edited

Use the equation editor as a text editor with syntax check Build the list of parameters / equations Export the selected parameters Automatically link the parameter file back to SolidWorks

Trailer_tank_vessel -> trailer_specs.txt

Another direct assignment


Create an equation using the Equation Manager and drop down list
Dimension view tab lists all dimensions Diameter@TankSketch dimension (1800) Equal sign starts equation input Smart character recognition
Typing a letter lists all possible matches (t) Additional letter narrows down possible matches (a)

Pick the matching global variable (TankDiameter)

Trailer_tank_vessel -> diameter@Tanksketch = TankDiameter

Another direct assignment


Create an equation using the Equation Manager
Dimension view tab lists all dimensions length@TankSketch (10000) Equal sign starts equation input Pick the global variable TrailerLength from the global variables section

Trailer_tank_vessel -> length@Tanksketch = TrailerLength

Conditional statement
Conditional statement
DimensionValue = IF(ConditionValue > X , ThenValue, ElseValue)

Open Equation Editor


Radius@TankFillet (250) Type an equal sign instead of the value (250) and continue to type if followed by a bracket Proposal after typing ta Select the global variable TankDiameter And finish the conditional statement:
=IF("TankDiameter" < 1500, 150, 250)

Confirm the equation and

Notice that nothing happens


But it will be soon
Trailer_tank_vessel -> TankDiameter -> Radius@TankFillet

Conditional statement
Legacy syntax:
2012: DimensionValue = IF(ConditionValue = X , ThenValue, ElseValue) 2011 and earlier: DimensionValue = IIF(ConditionValue Like X , ThenValue, ElseValue)

Trailer_tank_vessel -> TankDiameter -> Radius@TankFillet

Open the parameter file

Open the external file

TankDiameter = 1250 Save file Rebuild button inside of the Equation Manager Updates global variable Updates fillet value based on the conditional statement

###-Trailer

Suppressing / Unsuppressing features and components


Features and components can be suppressed with equations Makes sense in conjunction with a conditional statement
FeatureState = IF(ConditionValue > X, Suppressed, Unsuppressed)

Lets suppress the manway holes depending on the desired number


"manway3"= IF("ManwaysNumber = 1, "suppressed" , "unsuppressed" )

Open the equation editor


Add feature suppression Select the manway3 folder from the Feature Tree Tip: Folders can contain several features Type ahead capabilities help to type the equation:
IF(ManwaysNumber = 1, suppressed, unsuppressed)

Confirm the equation Parameter file changes will update the equations and geometry)
Trailer_tank_vessel

AND / OR in conjunction with conditional statements


Suppress the middle manway if ManwaysNumber = 2 or 1
Additional feature suppression:
manway2 folder gets suppressed

Equation handles the OR case


"manway2"= IF("ManwaysNumber = 2 OR "ManwaysNumber = 1, "suppressed" , "unsuppressed" )

This will suppress the manway2 if ManwaysNumber is either 2 or 1

Trailer_tank_vessel

Now lets look at the complete assembly


Toggle to the ###-trailer assembly and make some changes to the parameter file
"TrailerLength" = 5000 "TrailerWidth" = 2000 "TankDiameter" = 1200 "ManwaysNumber" = 1 "TrailerLength" = 7500 "TrailerWidth" = 2200 "TankDiameter" = 1400 "ManwaysNumber" = 2 "TrailerLength" = 10000 "TrailerWidth" = 2500 "TankDiameter" = 1800 "ManwaysNumber" = 3

Next one

Another one

And a last one


###-Trailer

TrailerLength = 12000

What else you should know about equations..


Link a dimension to a global parameter
Double click on a dimension (150) Equal sign starts equation input Typing test lets you create global variables on the fly Double click different dimension (150) Equal sign starts equation input combined with type ahead capabilities (te -> test) Double-click on either dimension allows modification of global paramter

Layout component

What else you should know about equations..


Filter the Equation Manager Automatic solve order

Manual Solve Order


Only possible after Automatic solve order is turned off

Local Undo/Redo Equation warnings


Tools -> Options -> System Options -> Messages/Errors/Warnings

Automatic rebuild Configurations

Helping SolidWorks Help You


Submit an Enhancement Request Turn on the performance logger
Tools-Options-System Options-General Enable performance email

Participate in the Beta program Respond to surveys Host a Product Definition customer visit
Sign up at: www.solidworks.com/usability Or drop me a business card with visit on the back of it

Alpha Testing Requires NDA Specification Reviews Requires NDA

Now we are at the end

Hopefully you have learned some new things about SolidWorks which help you to speed up your design...

Thanks

You might also like