Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mass Equation 2

Status
Not open for further replies.

Russell67

Automotive
Nov 1, 2005
114
I have a note in my assembly that reads "SW-Mass@s.sldasm"
i can move this from assembly to assembly and have it read the mass. The "s" is the prefix for standard assemblies. I want to multiply this by a percentage. How can i set this up to do that.

I can't do it as a custom property due to our plm system, hence the reason to do it as a note.

Any help is appreciated. Thanks
 
Replies continue below

Recommended for you

Do you mean the note is in your assembly (.sldasm) or assembly drawing (.slddrw)?

-handleman, CSWP (The new, easy test)
 
If you control the custom property in a design table, you have the full slate of Excel functions at your disposal to create strings from values.
 
I am putting the note in my assembly. I them would like to be capable of taking the value from this note and putting it on the drawing either by a current plm defined property or as a seperate note.

Situation is what we have are assemblies that are a combination of other assemblies as well as parts and these are welded together. Thru years of unscientific research they have determined that the weld material accounts for 4% of the mass.

Design tables are best, but first i want to show the process is capable of being done then i can convince the plm guys of a good direction.

Thanks
 
So... would it be OK to link the note in the assembly file to a custom property in that same file?

-handleman, CSWP (The new, easy test)
 
I believe the only way you will be able to calculate some percentage of the weight outside of a design table and custom properties is by using equations. While design tables are great at what they do, it's way too easy to modify the model without Excel doing the calculations that are supposed to change. Most people don't realize that the Excel formulas in a design table don't get evaluated unless the design table is edited.

To get the mass of a part in an equation, use:

"myMass"=swapp.getopendocument("s.SLDASM").extension.createmassproperty.mass

where "s.SLDASM" is the filename of the assembly. You will probably have to multiply by some scale factor to get the mass in the units you want. You can then use "myMass" in another equation, such as:

"myPctMass"="myMass"*0.04

Getting myPctMass into a note is a little trickier. You can either link a custom property to myPctMass and then link the note to that property or you can create some sketch entity in the model, dimension that entity, and link the dimension to myPctMass. You can then add the dimension value to a note by clicking on the dimension while editing the note.

You might also want to check out thread559-199796

-handleman, CSWP (The new, easy test)
 
is there any way of putting an equation like this in the part template i use, to get both kg and pounds as a property?
 
Put the following equation into your part:

"MassKg"= part.extension.createmassproperty.mass

This will return the mass in Kg, regardless of the document's unit settings. Then you can add the equation:

"MassLb"="MassKg"*2.2046226

to get the mass in pounds. Add your custom properties, link them to "MassKg" and "MassLb", then File->Save As... and choose "Part Template" as the type.

For some reason, last time I tried using "part.extension..." in an equation it didn't seem to work, so I used the "getopendocument" method. "Part" is much simpler, and you don't have to put in the exact filename.

-handleman, CSWP (The new, easy test)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor