Mass Equation
Mass Equation
(OP)
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
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






RE: Mass Equation
-handleman, CSWP (The new, easy test)
RE: Mass Equation
RE: Mass Equation
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
RE: Mass Equation
-handleman, CSWP (The new, easy test)
RE: Mass Equation
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: Problem useing mass prop volume in a DT or Equation?
-handleman, CSWP (The new, easy test)
RE: Mass Equation
RE: Mass Equation
"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)