SOLIDWORKS 2015 Variables with Linear Pattern Up to Reference

EmailFacebookGoogle+LinkedInTwitterShare

Last week I attended the MOKA SOLIDWORKS User Group meeting and saw an interesting presentation on using Variables in a way that I had never considered using them before.  The presentation was on tips for preparing to take one of the CSWP exams offered by SOLIDWORKS.  The modeling portion consisted of asking the student to model a part in where they were given a few orthogonal views of a model with Dimensions like A=240mm, and B=65mm etc.  The idea was that the drawing views showed dimensions with values of variables like A, B, C and such, and you had to vary these values throughout the exam to test that you understood the idea of design intent.  So if you took time to setup dimensions linked to Variables, then all you needed to do was to change the variable values per the instructions in the exam, and the results would be quick and easy to see.  So I decided to take this a step further and use this with the new option in SOLIDWORKS 2015’s Linear Pattern Up to Reference.

To start, let’s open the Equation Manager inside a new part model.  This can be done by either accessing the Equations folder in the FeatureManager Tree or if this is not shown already, you can access Equations by finding this in the Tools pull down menu.

Image01

Once you open the Equation Manager, you can add the Variables.  In my example, I added just a couple to set the length of an “L” bracket and the width of material for the bracket or “A” and “B”.  I also added a “C” for part thickness, which we don’t discuss in this example, and “D” which is needed for some flexibility later on.

Image02

So “A” is equal to 9 inches and “B” is equal to 1.5 inches.  I then draw my sketch and add relations and dimensions to get something like the example below:

Image03

Next I double click the 9 inch dimension, and do two things.  First, I change the name of the dimension from D1@sketch1 to A@sketch1 and then where it shows a 9.00 value I replace this with a simple equal sign (=).  This allows me to choose from the drop down list the option for variable.  Then I can pick my variable A which is set to 9 and then the Green Check mark to close the dimension box down.

Image04

Do the same for the 1.5 inch dimension on the side.  As I created my 1.5 inch from an Offset Entity command, one dimension drives both lines the same as well as the 9 value.

To round out the design of my L bracket, I decided to add in a hole wizard feature.  Below you will see that I added two locations and drove both with a linear dimension from two center lines based from the midpoints of the width of the flanges.  I also set the length of this dimension to equal the same as the “B” variable which is the width of the offset for the size of my L bracket.  Again, you can use your own values as this is just my example.  I did not need to rename this dimension to match the Variable name:

Image05

Finally we come to the importance of the Variable “D”.  In this example, I wanted to have some intelligence in that if the bracket became a certain size, I wanted SOLIDWORKS to add another instance of the Hole Wizard cut or take away one if it became too short or small.  So I decided to do a simple formula as you can see below.  My “D” variable states that D will be the number of instances in my Linear Feature Pattern, and this will be Equal to the Value of A divided by 3:

Image06

When I make my Linear Pattern, I need to choose to pattern Faces and pick the two faces from one of the countersunk holes and in this example the top horizontal edge of my bracket for a direction.  Then I will choose the Up to reference option followed by the end point shown with the Red Arrow.  The offset distance is again (=) to a Variable of (B) or 1.5 in my example.  And I am basing my pattern on a number of instances which again is set to be (=) to a Variable (D) in my case.

Image07

So I would do this again with a 2nd Linear Pattern feature as I can’t do both directions with two sets of faces.  And because of this setup, if you change the length of the bracket to be any size, the lengths will change as well as the number of holes based on the product of that length divided by 3.  It will always be a whole number.  Enjoy!

Brian Reel

CATI Field Technical Services Manager

Computer Aided Technology, Inc.