Using Equations in SolidWorks In this exercise we're going to create a plate with equally spaced holes controlled by a parameter file. You can change the width of the plate and/or the number of holes, and the hole pattern will automatically adjust. Using NotePad, create a file containing the following: "Plate width" = 5in "Plate height" = 3in "Num holes" = 4 Do not put a space before the "in". Save the file with the name params.txt Start SolidWorks. Create a new part. Click on Tool -> Equations Click on the Import button and import params.txt Notice that the variables are to be imported as "linked to file". Click Import in the pop-up window to confirm. Notice that three new global variables have been defined. Click OK to exit the Equations dialog. Create an Extruded Base feature on the Front plane. Draw a rectangle with arbitrary width and height. Click on View -> Dimension Names Use the Smart Dimension tool to assign visible dimensions to the rectangle. Right click on Equations in the feature manager tree. Select Manage Equations. Click on the Dimension View button. In the Dimensions section: D1@Sketch1 is the dimension for the width. Click in the Value/Equation box and replace the value with: = [Global Variables] "Plate width" [Enter] D2@Sketch1 is the dimension for the height. Click in the Value/Equation box and replace the value with: = [Global Variables] "Plate height" [Enter] Click OK to exit the Equation manager. Click OK to accept the sketch. Set the extrusion depth to 1/8 inch. Click OK to complete the extrude. Click on the Hole Wizard. Select regular "Hole", ANSI Inch, size #4, "Close fit", "Through All". Switch to the Positions tab and select the face of the plate. Put one hole near the bottom left corner of the plate. Select the Smart Dimension tool. Add a horizontal dimension from the hole to the left edge. This is D1. Add a vertical dimension from the hole to the bottom edge. This is D2. Click OK to exit the Hole Wizard. Open the #4 Clearance Hole feature in the feature manager tree. Edit the first sketch in that feature. Right click on Equations in the feature manager tree; select Manage Equations. Change the value of D2 in the sketch to: = [Global Variables] "Plate height" / 3 [Enter] Change the value of D1 in the sketch to: = [Global Variables] "Plate width" / ( [Global Variables] "Num holes" * 2) [Enter] Click OK to exit the sketch. Create a Linear Pattern feature. For Direction1, click on the bottom edge of the plate. For the distance D1, enter 1in For number of copies, enter 3. For Features to Pattern, select the Clearance Hole feature. Click OK to complete the pattern. In the feature manager tree, right click on Equations again and select Manage Equations. Set the value of D3@LPattern1 to: = [Global Variables] "Plate width" / [Global Variables] "Num holes" Set the value of D1@LPattern1 to: = "Num holes" Click OK. Notice that the plate has four evenly-spaced holes. In NotePad, change the number of holes from 4 to 5, and resave the file. Click on the Rebuild button and watch the number of holes change. In NotePad, change the width from 5 to 6 inches, and resave the file. Click on the Rebuild button and watch the part change. Go back into the Equation Manager and observe the four display modes: Equation View - shows only the equations you've defined. Sketch Equuation View - shows only equations for the current sketch; allows you to click and drag to change values Dimension View - shows every dimension in the part. Ordered View - shows order of evaluation for equations. CONDITIONAL FEATURES Using the Hole Wizard, create a new Clearance Hole feature. Set the hole size to #10. Click on the Positions tab, then click on the front face of the part. Draw a vertical centerline through the midline of the part. Place a point on this centerline, about 2/3 of the way up from the bottom. Add a vertical dimension between the point and the bottom edge. With the sketch still open, open the Equations manager. In the Equations section, click in the "Add equation" box. Click on the vertical dimension you just created. In the Value box, type the following: = [Global variables] "Plate height" * (2/3) [Enter] Click OK to exit the Equation Manager. Click OK again to complete the Clearance Hole feature. Open the Equation Manager again. In the Features section, click in the "Add feature suppression" box. Click on the Clearance Hole feature you just creted. In the Value box, type the following: = if( ([Global variables] "Num holes" / 2) = int([Global variables] "Num holes" / 2), "suppressed", "unsuppressed") Click OK to exit the feature manager. In Notepad, change the number of holes to 4 and resave the file. Click on the Rebuild button in SolidWorks. Notice that the second Clearance Hole feature is suppressed. Change the number of holes to 7 in Notepad and resave the file. Click Rebuild in SolidWorks. ================ CONFIGURATION MANAGER Click on the Configuration Manager button in the left window. Right click on the part and select "Add Configuration". Name the new configuration "signed". Click OK to exit the Configuration Manager. Click on the Feature manager button in the left window. Notice that the part is shown in the "signed" configuration. Create an Extruded Cut feature on the part face. In the sketch, add a text element. Type your initials in the text box and click OK. Move the text element to the top left corner of the part. Click OK and select "All bodies" if asked. Set the Extruded Cut parameter to "Through All" Click OK to complete the feature. Return to the Configuration Manager and double click on the "Default" configuration. Return to the Feature Manager. Notice that the Extruded Cut feature is now suppressed. ================ McMaster-Carr Go to www.mcmaster.com Type "standoffs" in the search box. Select Female standoffs Select Hex shape Select Inches Select 3/4 inch length Select 4-40 screw size Select 1/4 inch hex size Check the prices; which material is cheapest? Click on the part number for the part you want. Click on Product Details. Type "acrylic sheet" in the search box. Select "Sheets and bars" Select Acrylic Select 1/8 inch thickness Select Blue color Select 12 inch by 12 inch Select the colored part and click on the part number. Click on Product Details