Archive

Posts Tagged ‘equation’

Display Mass in Dual Units in SolidWorks

June 26, 2011 2 comments

Mission: Have the Mass in two different units

Ingredients  Required: A part,  an equation, a conversion factor, file properties, some notes and a drawing with a view (optional).

1. Open the Part.

2. Right click on the Equation folder in the Feature manger tree and select “Add Equation“.

3. Equation editor will open up along with the Add equation dialog box.

4. Type: “Weightin LBS” =

5. Now expand the add equation dialog box.

6. Click on SW-Mass property once.

7.  “SW-Mass” will get added to the equation and equation will now change to “Weightin LBS” = “SW-Mass”

8. Add the conversion/multiplication factor. In this case, I have taken it as 0.002. The equation is now “Weightin LBS” = “SW-Mass”*0.002

9. Click OK to close the Add equation dialog box.

10. You can see the evaluated value in the Equation editor.

11. Click OK to close the Equation editor.

12. The equation will appear under Equation folder.

13. Open up part summary information (File > Properties)

14. Click on either custom or configuration tab as required.

15. Start a new property. Type Weight in GMS under property name. Set type to Text. For value/Text Expressions, choose Mass from the drop down list.

16. You can see the evaluated value for the property.

17. Create another property. Type Weight in LBS under property name. Set type to Text. For value/Text Expressions, choose Weightin LBS from the drop down list.

18. You can see the evaluated value for the property.

19. Click OK to close the summary information window.

20. Start a Note (Insert > Annotations > Note).

21. Click anywhere on the screen and type Weight in GMS:

22. Now click on “Link to Property” in the note property manager.

23. In the Link to Property window, select current document and select Weight in GMS from the list.

24. Click OK to set the text.

25. In the same note, in the next line type Weight in LBS:, click on “Link to Property” in the note property manager and in the Link to Property window, select current document and select Weight in LBS from the list.

26. Click OK to set the text.

27. Click anywhere on the screen to exit the command. You can now the see the weight displayed in two different units.

28. Similar way you can set to display the weight  in two different units in drawings too.

I leaned a new thing while working on this post for which I would like to thank Wayne Matus. He taught me a method to set decimal places in equation. I had been struggling to control the decimal place in the evaluated value but no option to do that. So I throw up up the question to SW experts and Wayne came down bang on the answer with the simple method stated below.

1. Expand the Equation folder in the Feature manger tree, right click on the equation we just added above (i.e. “Weightin LBS”) and select Edit equation.

2. Edit equation dialog box will open up.

3. Equations use VBA so the Format command can be used with them.  Change the equation to : “WeightinLBS”= Format(“SW-Mass”*0.002, “#.###”) Just specify the nujmber of # after the . In my case, I have set it to 3.

4. Click OK to close the Edit equation dialog box.

5. You can see the updated evaluated value in the Equation editor.

6. Click OK to close the Equation editor.

7. And finally the updated Note in the part.

How to use Equations in Drawing Tables

November 2, 2010 2 comments

Do you have situation where you need equation to represent total weight, total length or something similar. I do sometimes need that. But now the question arises as how to do that. Where to put the equations to get the desired result. Let’s take a simple example of 4 welded pipe to explain the process.

The part contains a pipe of 2 different lengths welded corner to corner. The cut list shows the two different lengths and weight of one pipe each which means it is displaying the weight of just one pipe and not two pipe. Now someone on the manufacturing floor needs the combined weight of 2 pipes of same length. So we need to show the total weight of two pairs of pipe.

The weight displayed are 47.80 gms and 63.73 gms. But this is weight for one single pipe of each length and not the total weight. One way might had been to multiple the weight property in the cutlist (in part) by the quantity and get the desired result. Let’s try that.

  1. Open the part
  2. Expand the cut-list folder and right click on any of the cut-list item. Select Properties.
  3. Multiple the weight value by quantity i.e. by 2.
  4. The result is not what we need.

But this doesn’t mean it can be done. There are SW API experts who may be able to make a quick macro or script to do it. I’m not an expert with API so that is not in my scope.  Now the question is “Is there an easy way to do it”? The answer is Yes. Let’s see how to do it in an easy way.

  1. Start a new drawing.
  2. Add the required views. (I haven’t displayed the complete drawing but just an Isometric view)
  3. Add the cut-list. The cut-list format might be different on your machine. The cut-list here displays length and weight for one pipe but quantity displayed is two ech.
  4. Right click on the weight column. Select Insert > Column Right. This will add a new column on the right side.
  5. Hover your mouse on the top of new column and you’ll see a cyan box with some alphabet (F in this case).
  6. Click on the cyan box and you’ll see the column property manager.
  7. Keep the “User defined” selected under column properties and under tittle write TOTAL WEIGHT. You may write another tittle too. Click OK to set the tittle.
  8. Now click on cell next to weight value (in the first row). You’ll see the cell formatting window.
  9. Click on equation icon.
  10. Table Equation Editor will pop up.
  11. Now click on the column cell which you want to include in the equation.  Quantity cell (B2) in this case.
  12. Now type * (for multiplication).
  13. Now click on the Weight cell (E2) to include it in the equation (because we need total weight).
  14. The equation is complete now and will look like B2 * E2. You might have different cell number base don your cut list table.
  15. Finally click on OK to set the equation.
  16. The final value will appear in the required cell under Total Weight Column.
  17. Repeat the process for the bottom cell  or copy paste the equation from F2 to F3 but you’ll have to edit the cell number to get the correct value.

Similarly you can use the method for other drawing tables also.

Linking Dimensions (values) – 2

May 12, 2010 3 comments

Continued from part one, this post discuses the second method i.e. “Shared/Link Values method”

Shared/Link Values:

When dimensions are linked in this way, any member of the group can be used as a driving dimension. Changing any one of the linked values changes all others to which it is linked.

The variable name you specify becomes the name of the linked dimensions.

How to use Share/Link values to link two dimensions:

  1. Start a new part and start a sketch on any of the plane. Draw a rectangle with any size.
  2. Start dimensioning and give dimension of any one of the side but don’t click OK.
  3. Click on arrow next to dimension and from the list select “Link Value”
  4. Next you’ll see “Shared Values” window.
  5. Give a variable name in the box (I have used W as variable name) and click OK to come out of the shared values window.
  6. Click OK and come out of this window. Now you can see a link symbol in front of the dimension indicating that this is a linked dimension.
  7. Now dimension the other side, click on the arrow in the dimension value modify box and select Link Value.
  8. In the “Shared Values” window, click on the arrow and you can see W in the list.
  9. If we want to keep both the values same, select the W from list else write a new variable (in case you want to link this dimension to a different one). As I’m linking both of them to each other, I have selected W. Notice the change of value.
  10. Click OK and come out. You’ll see the similar link symbol as it is there in front of other dimension.
  11. Change any of the dimension value and see the effect on the second one.

This was really a very example of using/creating linking dimension value. And similarly you can create many linked dimensions with different variable name and values.

Linking Dimensions (values)–1

May 10, 2010 Leave a comment

As the post name suggested, here we will discuss on ways you can link two or more dimensions. The basic idea is make dimensions depend on each other and helps in quick updation of the dimension value.

The two ways via which dimensions can be linked are:

  1. Using Equations
  2. Shared/Link Values

Both the methods can be used in parts as well as assemblies.

Using Equations:

When dimensions are linked in this way, one member of the group is a driving dimension and second or others are driven dimension(s). Changing the value of driving dimension will change all others driven dimensions as per the equation has been set.

I have used a very basic sketch (rectangle) to explain the methods of using equations and link values.

How to use equations to link two dimensions:

  1. Start a new part and start a sketch on any of the plane. Draw a rectangle with any size.
  2. Start dimensioning and give dimension of any one of the side.
  3. Dimension the other side but don’t click on OK.
  4. Click on arrow next to dimension and from the list select “Add equation.”
  5. You’ll see a add equation window pop up with the current dimension there (“D2@Sketch1” in this case) with = sign.
  6. Now select the dimension already created in step 2 above and you’ll see that is added after = sign in the add equation window (“D1@Sketch1” in this case).
  7. Now the equation is “D2@Sketch1″ = “D1@Sketch1″ which means the value of “D2@Sketch1″ will be same as of “D1@Sketch1″ (1.000” in this case)
  8. Now say I want “D2@Sketch1″ to be half of “D1@Sketch1″. Simply add /2 at the end of the equation. Now the equation will look like “D2@Sketch1″ = “D1@Sketch1″/2.
  9. Click OK to come out of equation editor and you can see the equation listed in the equation window.
  10. Click OK to come out of equation window. You can notice the equation symbol in front of the dimension indicating that this is a driven dimension.
  11. Change the driving dimension value and see the change in the driven dimension value.

This was really a very example of using/creating equations. You can try lot of other settings, values, etc. in equations. And similarly you can create many equations.