|
mass equation
i have a note in my assembly that reads "
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.
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) |
|